Increment a semaphore
#include <sys/neutrino.h> int SyncSemPost( sync_t* sync ); int SyncSemPost_r( sync_t* sync );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The SyncSemPost() and SyncSemPost_r() kernel calls increment the semaphore referenced by the sync argument. If any threads are blocked on the semaphore, the one waiting the longest is unblocked and allowed to run.
These functions are identical, except for the way they indicate errors. See the Returns section for details.
The only difference between these functions is the way they indicate errors:
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
sem_destroy(), sem_init(), sem_post(), sem_trywait(), sem_wait(), SyncDestroy(), SyncSemWait(), SyncTypeCreate()