mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-06-19 14:54:28 +08:00
Microblaze port: Place critical section around XIntc_Enable() to protect read/modify/write operation performed inside the library.
This commit is contained in:
@ -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;
|
||||||
|
@ -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 );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user