psl1ght
A free SDK for Sony's PS3 console
|
Condition variables management. More...
#include <lv2/cond.h>
Go to the source code of this file.
Data Structures | |
struct | sys_cond_attr |
Condition variable attributes data structure. More... | |
Macros | |
#define | SYS_COND_ATTR_PSHARED 0x0200 |
Pshared attribute for condition variables. | |
Typedefs | |
typedef struct sys_cond_attr | sys_cond_attr_t |
Condition variable attributes data structure. | |
Functions | |
LV2_SYSCALL | sysCondCreate (sys_cond_t *cond, sys_mutex_t mutex, const sys_cond_attr_t *attr) |
Create a condition variable. More... | |
LV2_SYSCALL | sysCondDestroy (sys_cond_t cond) |
Destroy a condition variable. More... | |
LV2_SYSCALL | sysCondWait (sys_cond_t cond, u64 timeout_usec) |
Wait for a condition variable to be signaled. More... | |
LV2_SYSCALL | sysCondSignal (sys_cond_t cond) |
Signal a condition variable to at most one waiting thread. More... | |
LV2_SYSCALL | sysCondBroadcast (sys_cond_t cond) |
Signal a condition variable to all waiting threads. More... | |
Condition variables management.
LV2_SYSCALL sysCondBroadcast | ( | sys_cond_t | cond | ) |
Signal a condition variable to all waiting threads.
cond | Condition variable identifier. |
LV2_SYSCALL sysCondCreate | ( | sys_cond_t * | cond, |
sys_mutex_t | mutex, | ||
const sys_cond_attr_t * | attr | ||
) |
Create a condition variable.
cond | Pointer to storage for the created condition variable identifier. |
mutex | Pointer to the associated mutex. |
attr | Pointer to the attributes data structure. |
LV2_SYSCALL sysCondDestroy | ( | sys_cond_t | cond | ) |
Destroy a condition variable.
cond | Condition variable identifier. |
LV2_SYSCALL sysCondSignal | ( | sys_cond_t | cond | ) |
Signal a condition variable to at most one waiting thread.
cond | Condition variable identifier. |
LV2_SYSCALL sysCondWait | ( | sys_cond_t | cond, |
u64 | timeout_usec | ||
) |
Wait for a condition variable to be signaled.
The associated mutex must have been previously locked by the calling thread. This function atomically unlocks the mutex and waits for the condition variable to be signaled. Before returning to the calling thread, this function re-acquires the mutex.
cond | Condition variable identifier. |
timeout_usec | Timeout value in microseconds, or 0 if no timeout is used. |