Repository navigation
Conversation
BASEPRI == 0 disables priority masking. The previous check (basepri_ > nvic_prio) is always false in that case, so SST_Task_lock() never writes BASEPRI. Every lock taken while BASEPRI is 0 is therefore a no-op, including nested locks; SST_Task_unlock() restores 0, so the next lock fails the same way. Treat BASEPRI == 0 as the lowest priority in both the C and C++ ARM Cortex-M ports. Fixes QuantumLeaps#7
|
I'm sorry for my delayed response. The proposed change looks reasonable, but I didn't have a chance to verify on the target. Please do the verification step and submit along with the PR. Thanks a lot for the contribution, |
|
Sorry for the late reply. I only have an STM32F103C6 on hand, so I added an STM32F103C6 See test_priority_ceiling.md for the test results. The test posts an event from Blinky1 to Blinky3 while Blinky1 holds
The behavior is the same in Keil µVision simulator and on the real board. Is this verification sufficient, or would you like me to test anything else? |


BASEPRI == 0 disables priority masking. The previous check (basepri_ > nvic_prio) is always false in that case, so SST_Task_lock() never writes BASEPRI. Every lock taken while BASEPRI is 0 is therefore a no-op, including nested locks; SST_Task_unlock() restores 0, so the next lock fails the same way.
Treat BASEPRI == 0 as the lowest priority in both the C and C++ ARM Cortex-M ports.
Fixes #7