psl1ght
A free SDK for Sony's PS3 console
cond.h
Go to the documentation of this file.
1 
5 #ifndef __SYS_COND_H__
6 #define __SYS_COND_H__
7 
8 #include <lv2/cond.h>
9 
11 #define SYS_COND_ATTR_PSHARED 0x0200
12 
13 #ifdef __cplusplus
14  extern "C" {
15 #endif
16 
18 typedef struct sys_cond_attr
19 {
22  s32 flags;
23  u64 key;
24  char name[8];
26 
33 LV2_SYSCALL sysCondCreate(sys_cond_t *cond,sys_mutex_t mutex,const sys_cond_attr_t *attr)
34 {
35  lv2syscall3(105,(u64)cond,mutex,(u64)attr);
36  return_to_user_prog(s32);
37 }
38 
43 LV2_SYSCALL sysCondDestroy(sys_cond_t cond)
44 {
45  lv2syscall1(106,cond);
46  return_to_user_prog(s32);
47 }
48 
61 LV2_SYSCALL sysCondWait(sys_cond_t cond,u64 timeout_usec)
62 {
63  lv2syscall2(107,cond,timeout_usec);
64  return_to_user_prog(s32);
65 }
66 
71 LV2_SYSCALL sysCondSignal(sys_cond_t cond)
72 {
73  lv2syscall1(108,cond);
74  return_to_user_prog(s32);
75 }
76 
81 LV2_SYSCALL sysCondBroadcast(sys_cond_t cond)
82 {
83  lv2syscall1(109,cond);
84  return_to_user_prog(s32);
85 }
86 
87 #ifdef __cplusplus
88  }
89 #endif
90 
91 #endif
LV2_SYSCALL sysCondDestroy(sys_cond_t cond)
Destroy a condition variable.
Definition: cond.h:43
char name[8]
Definition: cond.h:24
LV2_SYSCALL sysCondSignal(sys_cond_t cond)
Signal a condition variable to at most one waiting thread.
Definition: cond.h:71
Condition variable attributes data structure.
Definition: cond.h:18
LV2_SYSCALL sysCondCreate(sys_cond_t *cond, sys_mutex_t mutex, const sys_cond_attr_t *attr)
Create a condition variable.
Definition: cond.h:33
u32 attr_pshared
Pshared flag. Must be 0 or SYS_COND_ATTR_PSHARED.
Definition: cond.h:21
Lightweight condition variable library.
s32 flags
Definition: cond.h:22
LV2_SYSCALL sysCondWait(sys_cond_t cond, u64 timeout_usec)
Wait for a condition variable to be signaled.
Definition: cond.h:61
struct sys_cond_attr sys_cond_attr_t
Condition variable attributes data structure.
u64 key
Definition: cond.h:23
LV2_SYSCALL sysCondBroadcast(sys_cond_t cond)
Signal a condition variable to all waiting threads.
Definition: cond.h:81