psl1ght
A free SDK for Sony's PS3 console
Loading...
Searching...
No Matches
mutex.h
Go to the documentation of this file.
1
5#ifndef __LV2_MUTEX_H__
6#define __LV2_MUTEX_H__
7
8#include <ppu-types.h>
9
10#define SYS_LWMUTEX_ATTR_PROTOCOL 0x0002
11#define SYS_LWMUTEX_ATTR_RECURSIVE 0x0010
12
14#define SYS_LWMUTEX_PROTOCOL_FIFO 1
16#define SYS_LWMUTEX_PROTOCOL_PRIO 2
18#define SYS_LWMUTEX_PROTOCOL_PRIO_INHERIT 3
19
21#define SYS_LWMUTEX_ATTR_RECURSIVE 0x0010
23#define SYS_LWMUTEX_ATTR_NOT_RECURSIVE 0x0020
24
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
39
61
68
74
81s32 sysLwMutexLock(sys_lwmutex_t *mutex,u64 timeout);
82
90
96
97#ifdef __cplusplus
98 }
99#endif
100
101#endif
s32 sysLwMutexTryLock(sys_lwmutex_t *mutex)
Try to lock a lightweight mutex (non-blocking).
struct sys_lwmutex_attr sys_lwmutex_attr_t
Lightweight mutex attributes data structure.
s32 sysLwMutexCreate(sys_lwmutex_t *mutex, const sys_lwmutex_attr_t *attr)
Create a lightweight mutex.
s32 sysLwMutexLock(sys_lwmutex_t *mutex, u64 timeout)
Lock a lightweight mutex.
struct sys_lwmutex sys_lwmutex_t
Lightweight mutex data structure.
s32 sysLwMutexDestroy(sys_lwmutex_t *mutex)
Destroy a lightweight mutex.
s32 sysLwMutexUnlock(sys_lwmutex_t *mutex)
Unlock a previously locked lightweight mutex.
Lightweight mutex attributes data structure.
Definition mutex.h:42
char name[8]
Lightweight mutex name.
Definition mutex.h:59
u32 attr_protocol
Scheduling policy.
Definition mutex.h:50
u32 attr_recursive
Recursive setting.
Definition mutex.h:57
Lightweight mutex data structure.
Definition mutex.h:32
u32 recursive_count
Recursive count.
Definition mutex.h:35
u32 attribute
Attribute.
Definition mutex.h:34
u32 sleep_queue
Sleep queue.
Definition mutex.h:36
u32 _pad
Unused padding element.
Definition mutex.h:37
u64 lock_var
Locking variable.
Definition mutex.h:33