nesting variable is initialised to a non-zero value. */\r
#define portINITIAL_NESTING_VALUE ( 0xff )\r
\r
-/* The bit within the MSR register that enabled/disables interrupts and \r
+/* The bit within the MSR register that enabled/disables interrupts and\r
exceptions respectively. */\r
#define portMSR_IE ( 0x02U )\r
#define portMSR_EE ( 0x100U )\r
disabled. Each task will enable interrupts automatically when it enters\r
the running state for the first time. */\r
*pxTopOfStack = mfmsr() & ~portMSR_IE;\r
- \r
+\r
#if( MICROBLAZE_EXCEPTIONS_ENABLED == 1 )\r
{\r
/* Ensure exceptions are enabled for the task. */\r
lReturn = prvEnsureInterruptControllerIsInitialised();\r
if( lReturn == pdPASS )\r
{\r
- XIntc_Enable( &xInterruptControllerInstance, ucInterruptID );\r
+ /* Critical section protects read/modify/writer operation inside\r
+ XIntc_Enable(). */\r
+ portENTER_CRITICAL();\r
+ {\r
+ XIntc_Enable( &xInterruptControllerInstance, ucInterruptID );\r
+ }\r
+ portEXIT_CRITICAL();\r
}\r
\r
configASSERT( lReturn );\r