From d7220d75f5f3ff43b35e581ffc6ba0e3afde6132 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Wed, 13 Feb 2008 19:43:30 +0000 Subject: [PATCH] Change to use the configKERNEL_INTERRUPT_PRIORITY setting. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@188 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/portable/Softune/MB91460/port.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Source/portable/Softune/MB91460/port.c b/Source/portable/Softune/MB91460/port.c index 80fe0b175..90ad44802 100644 --- a/Source/portable/Softune/MB91460/port.c +++ b/Source/portable/Softune/MB91460/port.c @@ -353,15 +353,20 @@ const unsigned portSHORT usReloadValue = ( unsigned portSHORT ) ( ( ( configPER_ void vPortEnterCritical( void ) { - /* Disable interrupts */ - portDISABLE_INTERRUPTS(); + /* Disable interrupts upto level 30. */ + #if configKERNEL_INTERRUPT_PRIORITY != 30 + #error configKERNEL_INTERRUPT_PRIORITY (set in FreeRTOSConfig.h) must match the ILM value set in the following line - 30 (0x1e) being the default. + #endif + + __asm(" STILM #1Eh "); + /* Now interrupts are disabled ulCriticalNesting can be accessed - directly. Increment ulCriticalNesting to keep a count of how many times - portENTER_CRITICAL() has been called. */ + directly. Increment ulCriticalNesting to keep a count of how many times + portENTER_CRITICAL() has been called. */ ulCriticalNesting++; } -/*-----------------------------------------------------------*/ +/*-----------------------------------------------------------*/ void vPortExitCritical( void ) { @@ -370,9 +375,8 @@ void vPortExitCritical( void ) ulCriticalNesting--; if( ulCriticalNesting == portNO_CRITICAL_NESTING ) { - /* Enable all interrupt/exception. */ - portENABLE_INTERRUPTS(); + /* Enable all interrupts */ + __asm(" STILM #1Fh "); } } } -/*-----------------------------------------------------------*/ -- 2.39.5