Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nanostack-hal: add alternative critical section implementation
The nanostack hal's critical section uses a mutex for mutual exclusion, which is nice for many use cases. But when one needs to use the critical section from interrupts, the RTX will have a assertion failure and panic. Add a configurable for mbed_lib, which can be used to enable a alternative version of critical section, which uses the underlying OS primitives, which disables the interrupts. Note: the default behavior is not changed, one needs to override the "nanostack-hal.critical-section-usable-from-interrupt" to have "true". Reason for this change is that there is a need for sending events using nanostack event queue from interrupt context, eg. from a socket callback.
- Loading branch information
1 parent
d24c7c4
commit f0cc00e
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters