![]() |
![]() |
![]() |
Increment a semaphore
#include <sys/neutrino.h> int SyncSemPost( sync_t* sync ); int SyncSemPost_r( sync_t* sync );
libc
The SyncSemPost() and SyncSemPost_r() functions are identical except in the way they indicate errors. See the Returns section for details.
These functions increment the semaphore referenced by the sync argument. If any threads are blocked on the semaphore, the one waiting the longest is inblocked and allowed to run.
The only difference between these functions is the way they indicate errors:
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
![]() |
![]() |
![]() |