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
There is a fairly fundamental incompatibility between Zephyr spin locks
and the Critical Section specification. Zephyr spin locks do not allow
nesting from within a single spin lock. The critical section API only
has an `acquire` and `release` entry, and provides no way (such as a
stack frame) to have a unique context for different invocation places.
Unfortunately, this means we cannot use spin locks for critical
sections.
Instead, this change implements critical sections using irq locking.
The implementation of these macros on Zephyr does try to make them SMP
safe, with a simple atomic lock, but there is still something preventing
the riscv SMP from working.
Also, these entries cannot be called from user mode. There are various
other reasons we don't support usermode, so at this time, just have a
compile time assertion that usermode is not enabled in the build. If it
is needed, we will have to come up with another way to implement this.
Signed-off-by: David Brown <[email protected]>
0 commit comments