\r
void vPortEnterCritical( void )\r
{\r
- /* Disable interrupts */\r
- portDISABLE_INTERRUPTS();\r
+ /* Disable interrupts upto level 30. */\r
+ #if configKERNEL_INTERRUPT_PRIORITY != 30\r
+ #error configKERNEL_INTERRUPT_PRIORITY (set in FreeRTOSConfig.h) must match the ILM value set in the following line - 30 (0x1e) being the default.\r
+ #endif\r
+\r
+ __asm(" STILM #1Eh ");\r
+ \r
\r
/* Now interrupts are disabled ulCriticalNesting can be accessed\r
- directly. Increment ulCriticalNesting to keep a count of how many times\r
- portENTER_CRITICAL() has been called. */\r
+ directly. Increment ulCriticalNesting to keep a count of how many times\r
+ portENTER_CRITICAL() has been called. */\r
ulCriticalNesting++;\r
}\r
-/*-----------------------------------------------------------*/\r
+/*-----------------------------------------------------------*/ \r
\r
void vPortExitCritical( void )\r
{\r
ulCriticalNesting--;\r
if( ulCriticalNesting == portNO_CRITICAL_NESTING )\r
{\r
- /* Enable all interrupt/exception. */\r
- portENABLE_INTERRUPTS();\r
+ /* Enable all interrupts */\r
+ __asm(" STILM #1Fh ");\r
}\r
}\r
}\r
-/*-----------------------------------------------------------*/\r