This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Global interrupts silently re-enabled by some RL-RTX routines

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

Parents
  • From a code review, I seem to not be affected by this bug/misfeature/documentation oops, but the documentation really has to mention this.

    This also shows the need for having 100% access to all source in important embedded projects. It isn't possible to do a satisfactory code review if the code calls undocumented black-box functions where we have to rely on just trust/hope. I hope Keil will reconsider their view on supplying the network stack as a library.

Reply
  • From a code review, I seem to not be affected by this bug/misfeature/documentation oops, but the documentation really has to mention this.

    This also shows the need for having 100% access to all source in important embedded projects. It isn't possible to do a satisfactory code review if the code calls undocumented black-box functions where we have to rely on just trust/hope. I hope Keil will reconsider their view on supplying the network stack as a library.

Children
No data