#include <cafe/mp.h> inline void MPInitSpinLock(MPSpinLock* spinlock);
MPInitSpinLock initializes a
MPSpinLock for usage. After returning, the
MPSpinLock is capable of being used by MP Synchronization APIs.
MPSpinLock is an inline SMP spinlock implementation, which has low overhead.
This basic spinlock must be used carefully. The intended use is to guard access
to shared memory between equal priority threads each running on a different core.
Important usage notes while holding a spinlock:
OSSpinLock is designed to handle thread priority inversion issues. However,
still busy-waits, if a thread wants to sleep one needs to use an
|Multiple threads||This function is not thread-safe.|
2013/05/08 Automated cleanup pass.
2010/08/23 Initial version.