You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unlike RTX, FreeRTOS does nesting in vTaskSuspendAll(). If the scheduling has already been suspended before osKernelLock() is called, osKernelRestoreLock() will increase the nesting level by 1 instead of removing 1 lock. So:
vTaskSuspendAll(); // the nesting level is at least 1
...
state = osKernelLock(); // does not increase nesting, returns 1 (was locked already)
...
osKernelRestoreLock(state); // will call vTaskSuspendAll() to "restore" the lock -> boom...
The text was updated successfully, but these errors were encountered:
CMSIS-FreeRTOS/CMSIS/RTOS2/FreeRTOS/Source/cmsis_os2.c
Line 397 in ba82e7e
Unlike RTX, FreeRTOS does nesting in vTaskSuspendAll(). If the scheduling has already been suspended before osKernelLock() is called, osKernelRestoreLock() will increase the nesting level by 1 instead of removing 1 lock. So:
The text was updated successfully, but these errors were encountered: