Releases the resource protected by the specified semaphore.
#include <semaphore.h> int sem_post ( sem_t *sem );
(IN) Points to the semaphore to signal.
If successful, returns 0 and increments the semaphore value. Otherwise, returns -1 and sets errno to one of the following values.
The sem_post function increments the semaphore value. If a thread is waiting for the semaphore, it makes the blocked thread runnable. If multiple threads are blocked on the semaphore, no assumptions can be made about which of those threads might be unblocked.