sem_post2
Unlock a semaphore
Usage
#include <semaphore.h>
int
sem_post(sem_t *sem);
Overview
The semaphore referenced by sem is unlocked, the value of the semaphore is incremented, and all threads which are waiting on the semaphore are awakened.
sem_post() is reentrant with respect to signals and may be called from within a signal hanlder.
If successful, sem_post() will return 0. Otherwise, -1 is returned and errno is set.
Errors
sem_post() succeeds unless:
- [EINVAL]
-
sem is not a valid semaphore descriptor.
Releases
161 releases since Mac OS X 10.0; the text changed 2 times.