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

This commit is contained in:
Richard Barry 2018-01-30 17:42:12 +00:00
parent 208cc18a90
commit 7ddb8b342d
2 changed files with 10 additions and 4 deletions

View file

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

View file

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