4 #ifndef __SEMAPHORE_H__
5 #define __SEMAPHORE_H__
9 #define __SIZEOF_SEM_T 12
12 char __size[__SIZEOF_SEM_T];
int sem_post(sem_t *sem)
Increase the value of the semaphore.
Definition: semaphore.c:107
int sem_trywait(sem_t *sem)
The same as sem_wait(), except that if the decrement cannot be immediately performed,...
Definition: semaphore.c:112
int sem_init(sem_t *sem, int pshared, unsigned int value)
Initialize the semaphore.
Definition: semaphore.c:89
int sem_destroy(sem_t *sem)
Destroy the semaphore.
Definition: semaphore.c:98
int sem_getvalue(sem_t *sem, int *sval)
Get the value of the semaphore.
Definition: semaphore.c:122
int sem_wait(sem_t *sem)
Decrement the value of the semaphore. If the semaphore currently has the value zero,...
Definition: semaphore.c:117
Definition: semaphore.h:11