#include <cafe/os.h> void OSFastMutex_Lock (OSFastMutex* fastMutex);
|fastMutex||Pointer to fast mutex.|
The calling thread tries to lock the fast mutex that fastMutex specifies.
There are several major differences between a mutex and a fast mutex.
OSSchedulerLock. All mutex acquire and release the
OSSchedulerLockeach time a mutex is used. A fast mutex uses atomic operations first and then, only if there is contention, the
OSSchedulerLockis taken. Because of this, a fast mutex may lock and unlock approximately 3X faster than a mutex.
OSFastMutex_Lockfunction return immediately. Each call to the
OSFastMutex_Unlockfunction must correspond to a call to the
OSFastMutex_Lockfunction. Otherwise, the fast mutex remains locked. This allows one thread to safely nest multiple calls to the
OSFastMutex_Unlockfunctions for the same fast mutex.
|Callbacks||Do not call this function from any callback function.|
2013-04-24 Initial version.