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 pipe for SMP support
The original pipe implementation used CRITICAL_ENTER() and
CRITICAL_LEAVE() to protect critical sections by disabling interrupts,
which was acceptable for single-core systems.
To support SMP, these macros are replaced with a proper spinlock based
on RV32A atomic instructions. This ensures safe concurrent access to
the circular buffer used by the pipe, even when multiple harts are
performing read or write operations simultaneously.
This change is necessary to avoid race conditions and ensure correct
pipe behavior under multi-hart task scheduling.
0 commit comments