mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
freertos(SMP): Fix SMP FreeRTOS portDISABLE_INTERRUPTS() macro on xtensa port
The portDISABLE_INTERRUPTS() macro on Xtensa should return only the interrupt mask/level before the interrupts were disabled. Previously, the entire contents of PS register were returned (i.e., direct return from RSIL instruction without any bit masking or shifting). This commit fixes the portDISABLE_INTERRUPTS() macro to return the INTLEVEL bitfield of the PS register.
This commit is contained in:
parent
fd9c88ac85
commit
816ddc8867
@ -143,6 +143,7 @@ void vPortCleanUpTCB ( void *pxTCB );
|
||||
#define portDISABLE_INTERRUPTS() ({ \
|
||||
unsigned int prev_level = XTOS_SET_INTLEVEL(XCHAL_EXCM_LEVEL); \
|
||||
portbenchmarkINTERRUPT_DISABLE(); \
|
||||
prev_level = ((prev_level >> XCHAL_PS_INTLEVEL_SHIFT) & XCHAL_PS_INTLEVEL_MASK); \
|
||||
prev_level; \
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user