|
psl1ght
A free SDK for Sony's PS3 console
|
Semaphore management syscalls. More...
#include <ppu-lv2.h>Go to the source code of this file.
Data Structures | |
| struct | sys_sem_attr |
| Semaphore sttributes data structure. More... | |
Macros | |
| #define | SYS_SEM_ATTR_PROTOCOL 0x0002 |
| Default protocol for semaphore attributes. | |
| #define | SYS_SEM_ATTR_PSHARED 0x0200 |
| Default sharing policy for semaphore attributes. | |
Typedefs | |
| typedef struct sys_sem_attr | sys_sem_attr_t |
| Semaphore sttributes data structure. | |
Functions | |
| LV2_SYSCALL | sysSemCreate (sys_sem_t *sem, const sys_sem_attr_t *attr, s32 initial_val, s32 max_val) |
| Create a semaphore. More... | |
| LV2_SYSCALL | sysSemDestroy (sys_sem_t sem) |
| Destroy a semaphore. More... | |
| LV2_SYSCALL | sysSemWait (sys_sem_t sem, u64 timeout_usec) |
| Wait and reserve a semaphore. More... | |
| LV2_SYSCALL | sysSemTryWait (sys_sem_t sem) |
| Reserve a semaphore (non-blocking). More... | |
| LV2_SYSCALL | sysSemPost (sys_sem_t sem, s32 count) |
| Release a semaphore. More... | |
| LV2_SYSCALL | sysSemGetValue (sys_sem_t sem, s32 *count) |
| Get the value of a semaphore. More... | |
Semaphore management syscalls.
| LV2_SYSCALL sysSemCreate | ( | sys_sem_t * | sem, |
| const sys_sem_attr_t * | attr, | ||
| s32 | initial_val, | ||
| s32 | max_val | ||
| ) |
Create a semaphore.
| sem | Pointer to storage to the semaphore id. |
| attr | Pointer to the semaphore attributes. |
| initial_val | Initial value. |
| max_val | Maximum value. |
| LV2_SYSCALL sysSemDestroy | ( | sys_sem_t | sem | ) |
Destroy a semaphore.
| sem | The semaphore id. |
| LV2_SYSCALL sysSemGetValue | ( | sys_sem_t | sem, |
| s32 * | count | ||
| ) |
Get the value of a semaphore.
| sem | The semaphore id. |
| count | Pointer to storage for the semaphore value. |
| LV2_SYSCALL sysSemPost | ( | sys_sem_t | sem, |
| s32 | count | ||
| ) |
Release a semaphore.
| sem | The semaphore id. |
| count | Increment value. |
| LV2_SYSCALL sysSemTryWait | ( | sys_sem_t | sem | ) |
Reserve a semaphore (non-blocking).
| sem | The semaphore id. |
| LV2_SYSCALL sysSemWait | ( | sys_sem_t | sem, |
| u64 | timeout_usec | ||
| ) |
Wait and reserve a semaphore.
| sem | The semaphore id. |
| timeout_usec | Timeout value in microseconds, or 0 if no timeout is used. |
1.8.15