POSIX Semaphores option group.
More...
|
| typedef struct k_sem | sem_t |
| | Semaphore object type.
|
| |
|
| int | sem_destroy (sem_t *semaphore) |
| | Destroy an unnamed semaphore.
|
| |
| int | sem_getvalue (sem_t *ZRESTRICT semaphore, int *ZRESTRICT value) |
| | Get the current value of a semaphore.
|
| |
| int | sem_init (sem_t *semaphore, int pshared, unsigned int value) |
| | Initialise an unnamed semaphore.
|
| |
| int | sem_post (sem_t *semaphore) |
| | Unlock a semaphore (increment its count).
|
| |
| int | sem_timedwait (sem_t *ZRESTRICT semaphore, struct timespec *ZRESTRICT abstime) |
| | Lock a semaphore with an absolute timeout.
|
| |
| int | sem_trywait (sem_t *semaphore) |
| | Try to lock a semaphore without blocking.
|
| |
| int | sem_wait (sem_t *semaphore) |
| | Lock a semaphore, blocking until it becomes available.
|
| |
| sem_t * | sem_open (const char *name, int oflags,...) |
| | Open or create a named semaphore.
|
| |
| int | sem_unlink (const char *name) |
| | Remove a named semaphore.
|
| |
| int | sem_close (sem_t *sem) |
| | Close a named semaphore.
|
| |
POSIX Semaphores option group.
◆ SEM_FAILED
| #define SEM_FAILED ((sem_t *) 0) |
◆ sem_t
| typedef struct k_sem sem_t |
Semaphore object type.
Definition at line 34 of file semaphore.h.
◆ sem_close()
| int sem_close |
( |
sem_t * |
sem | ) |
|
◆ sem_destroy()
| int sem_destroy |
( |
sem_t * |
semaphore | ) |
|
◆ sem_getvalue()
| int sem_getvalue |
( |
sem_t *ZRESTRICT |
semaphore, |
|
|
int *ZRESTRICT |
value |
|
) |
| |
◆ sem_init()
| int sem_init |
( |
sem_t * |
semaphore, |
|
|
int |
pshared, |
|
|
unsigned int |
value |
|
) |
| |
◆ sem_open()
| sem_t * sem_open |
( |
const char * |
name, |
|
|
int |
oflags, |
|
|
|
... |
|
) |
| |
◆ sem_post()
| int sem_post |
( |
sem_t * |
semaphore | ) |
|
◆ sem_timedwait()
| int sem_timedwait |
( |
sem_t *ZRESTRICT |
semaphore, |
|
|
struct timespec *ZRESTRICT |
abstime |
|
) |
| |
◆ sem_trywait()
| int sem_trywait |
( |
sem_t * |
semaphore | ) |
|
◆ sem_unlink()
| int sem_unlink |
( |
const char * |
name | ) |
|
◆ sem_wait()
| int sem_wait |
( |
sem_t * |
semaphore | ) |
|