WUT
0.1
Wii U Toolchain
|
Data Structures | |
struct | OSMutexLink |
struct | OSMutex |
Macros | |
#define | OS_MUTEX_TAG 0x6D557458u |
Typedefs | |
typedef struct OSThread | OSThread |
typedef struct OSMutex | OSMutex |
typedef struct OSMutexLink | OSMutexLink |
Functions | |
void | OSInitMutex (OSMutex *mutex) |
void | OSInitMutexEx (OSMutex *mutex, const char *name) |
void | OSLockMutex (OSMutex *mutex) |
BOOL | OSTryLockMutex (OSMutex *mutex) |
void | OSUnlockMutex (OSMutex *mutex) |
Standard mutex object, supports recursive locking.
Similar to std::recursive_mutex.
typedef struct OSMutexLink OSMutexLink |
void OSInitMutex | ( | OSMutex * | mutex | ) |
Initialise a mutex structure.
void OSInitMutexEx | ( | OSMutex * | mutex, |
const char * | name | ||
) |
Initialise a mutex structure with a name.
void OSLockMutex | ( | OSMutex * | mutex | ) |
Lock the mutex.
If no one owns the mutex, set current thread as owner.
If the lock is owned by the current thread, increase the recursion count.
If the lock is owned by another thread, the current thread will sleep until the owner has unlocked this mutex.
Similar to std::recursive_mutex::lock.
Try to lock a mutex.
If no one owns the mutex, set current thread as owner.
If the lock is owned by the current thread, increase the recursion count.
If the lock is owned by another thread, do not block, return FALSE.
Similar to std::recursive_mutex::try_lock.
void OSUnlockMutex | ( | OSMutex * | mutex | ) |
Unlocks the mutex.
Will decrease the recursion count, will only unlock the mutex when the recursion count reaches 0.
If any other threads are waiting to lock the mutex they will be woken.
Similar to std::recursive_mutex::unlock.