Hi everyone, we found out that some RL-RTX routines, like _free_box(), and potentially some others, silently re-enable global interrupts. To me it is clearly a bug that becomes obvious if you try calling such a routine from within a critical section. All of the sudden the interrupts get re-enabled on the exit from this function.
When we reported the problem, the Keil's developers responded with the following statement:
"_free_box() function is thread safe and can be called from main or irq mode. Because the SVC mode in Cortex-M can be interrupted by a higher priority interrupt, we protect the critical part of code with interrupt disable and enable.
The customer shall disable only his peripheral interrupts not a global interrupt"
I can't agree with it - as much as RTOS needs to protect its critical part, we need to do the same in our applications. The status of global interrupts must be saved before disabling them, and restored upon exit. Has anyone else found any issues with global interrupts in RL-RTX function calls?
Thanks, Sergey