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
Replace interrupt masking with spinlock in mqueue for SMP support
The original message queue implementation used CRITICAL_ENTER() and
CRITICAL_LEAVE() to protect critical sections by disabling interrupts.
This was sufficient for single-core systems, where only one hart could
execute tasks.
To support SMP, we replace these macros with a proper spinlock using
RV32A atomic instructions. This ensures safe access to the internal
queue structures when multiple harts concurrently interact with message
queues.
This change eliminates potential race conditions in message queue
operations as we move toward multi-hart scheduling.
0 commit comments