mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Microblaze port: Place critical section around XIntc_Enable() to protect read/modify/write operation performed inside the library.
This commit is contained in:
parent
208cc18a90
commit
7ddb8b342d
|
@ -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;
|
||||||
|
|
|
@ -305,7 +305,13 @@ int32_t lReturn;
|
||||||
lReturn = prvEnsureInterruptControllerIsInitialised();
|
lReturn = prvEnsureInterruptControllerIsInitialised();
|
||||||
if( lReturn == pdPASS )
|
if( lReturn == pdPASS )
|
||||||
{
|
{
|
||||||
XIntc_Enable( &xInterruptControllerInstance, ucInterruptID );
|
/* Critical section protects read/modify/writer operation inside
|
||||||
|
XIntc_Enable(). */
|
||||||
|
portENTER_CRITICAL();
|
||||||
|
{
|
||||||
|
XIntc_Enable( &xInterruptControllerInstance, ucInterruptID );
|
||||||
|
}
|
||||||
|
portEXIT_CRITICAL();
|
||||||
}
|
}
|
||||||
|
|
||||||
configASSERT( lReturn );
|
configASSERT( lReturn );
|
||||||
|
|
Loading…
Reference in a new issue