5 #ifndef __LV2_MUTEX_H__ 6 #define __LV2_MUTEX_H__ 10 #define SYS_LWMUTEX_ATTR_PROTOCOL 0x0002 11 #define SYS_LWMUTEX_ATTR_RECURSIVE 0x0010 14 #define SYS_LWMUTEX_PROTOCOL_FIFO 1 16 #define SYS_LWMUTEX_PROTOCOL_PRIO 2 18 #define SYS_LWMUTEX_PROTOCOL_PRIO_INHERIT 3 21 #define SYS_LWMUTEX_ATTR_RECURSIVE 0x0010 23 #define SYS_LWMUTEX_ATTR_NOT_RECURSIVE 0x0020 char name[8]
Lightweight mutex name.
Definition: mutex.h:59
struct sys_lwmutex_attr sys_lwmutex_attr_t
Lightweight mutex attributes data structure.
u32 _pad
Unused padding element.
Definition: mutex.h:37
u64 lock_var
Locking variable.
Definition: mutex.h:33
u32 attr_recursive
Recursive setting.
Definition: mutex.h:57
s32 sysLwMutexDestroy(sys_lwmutex_t *mutex)
Destroy a lightweight mutex.
Lightweight mutex attributes data structure.
Definition: mutex.h:41
struct sys_lwmutex sys_lwmutex_t
Lightweight mutex data structure.
Lightweight mutex data structure.
Definition: mutex.h:31
s32 sysLwMutexTryLock(sys_lwmutex_t *mutex)
Try to lock a lightweight mutex (non-blocking).
s32 sysLwMutexUnlock(sys_lwmutex_t *mutex)
Unlock a previously locked lightweight mutex.
u32 sleep_queue
Sleep queue.
Definition: mutex.h:36
u32 recursive_count
Recursive count.
Definition: mutex.h:35
s32 sysLwMutexLock(sys_lwmutex_t *mutex, u64 timeout)
Lock a lightweight mutex.
u32 attr_protocol
Scheduling policy.
Definition: mutex.h:50
s32 sysLwMutexCreate(sys_lwmutex_t *mutex, const sys_lwmutex_attr_t *attr)
Create a lightweight mutex.
u32 attribute
Attribute.
Definition: mutex.h:34