From ee743909f39f99e8a495897b518cb80a35e65e12 Mon Sep 17 00:00:00 2001 From: RichardBarry Date: Thu, 7 Aug 2008 19:10:25 +0000 Subject: [PATCH] Added function stubs. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@432 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/portable/GCC/ColdFire_V2/port.c | 37 ++++++++++++++++++++- Source/portable/GCC/ColdFire_V2/portmacro.h | 2 +- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/Source/portable/GCC/ColdFire_V2/port.c b/Source/portable/GCC/ColdFire_V2/port.c index 17bc0ae20..37ffb3a9f 100644 --- a/Source/portable/GCC/ColdFire_V2/port.c +++ b/Source/portable/GCC/ColdFire_V2/port.c @@ -52,6 +52,8 @@ #include "FreeRTOS.h" #include "task.h" +static unsigned portLONG ulCriticalNesting = 0x9999UL; + portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE * pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) { @@ -61,10 +63,43 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE * pxTopOfStack, pdTASK_COD portBASE_TYPE xPortStartScheduler( void ) { + ulCriticalNesting = 0UL; } /*-----------------------------------------------------------*/ void vPortEndScheduler( void ) { } -/*-----------------------------------------------------------*/ \ No newline at end of file +/*-----------------------------------------------------------*/ + +void vPortEnterCritical( void ) +{ + portDISABLE_INTERRUPTS(); + ulCriticalNesting++; +} +/*-----------------------------------------------------------*/ + +void vPortExitCritical( void ) +{ + ulCriticalNesting--; + if( ulCriticalNesting == 0 ) + { + portENABLE_INTERRUPTS(); + } +} +/*-----------------------------------------------------------*/ + +unsigned portBASE_TYPE uxPortSetInterruptMaskFromISR( void ) +{ + return 0; +} +/*-----------------------------------------------------------*/ + +void vPortClearInterruptMaskFromISR( unsigned portBASE_TYPE uxSavedInterruptMask ) +{ +} + + + + + diff --git a/Source/portable/GCC/ColdFire_V2/portmacro.h b/Source/portable/GCC/ColdFire_V2/portmacro.h index f503d8a8e..46e6e4785 100644 --- a/Source/portable/GCC/ColdFire_V2/portmacro.h +++ b/Source/portable/GCC/ColdFire_V2/portmacro.h @@ -100,7 +100,7 @@ extern void vTaskExitCritical( void ); #define portENTER_CRITICAL() vPortEnterCritical() #define portEXIT_CRITICAL() vPortExitCritical() -extern unsigned portBASE_TYPE uxPortSetInterruptMaskFromISR(); +extern unsigned portBASE_TYPE uxPortSetInterruptMaskFromISR( void ); extern void vPortClearInterruptMaskFromISR( unsigned portBASE_TYPE ); #define portSET_INTERRUPT_MASK_FROM_ISR() uxPortSetInterruptMaskFromISR() #define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusRegister ) vPortClearInterruptMaskFromISR( uxSavedStatusRegister ) -- 2.39.5