Microblaze port: Place critical section around XIntc_Enable() to protect read/modify/write operation performed inside the library.

pull/1/head
Richard Barry 7 years ago
parent 208cc18a90
commit 7ddb8b342d

@ -210,7 +210,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
static void prvTxHandler( void *pvUnused, unsigned portBASE_TYPE uxUnused )
{
BaseType_t xHigherPriorityTaskWoken = NULL;
BaseType_t xHigherPriorityTaskWoken = ( BaseType_t ) NULL;
( void ) pvUnused;
( void ) uxUnused;

@ -304,9 +304,15 @@ int32_t lReturn;
to this file. */
lReturn = prvEnsureInterruptControllerIsInitialised();
if( lReturn == pdPASS )
{
/* Critical section protects read/modify/writer operation inside
XIntc_Enable(). */
portENTER_CRITICAL();
{
XIntc_Enable( &xInterruptControllerInstance, ucInterruptID );
}
portEXIT_CRITICAL();
}
configASSERT( lReturn );
}

Loading…
Cancel
Save