int sem_post( sem_t *sem );
sem
argument does not refer to a valid semaphore
This function attempts to release the semaphore specified by sem
. If
other tasks are waiting on the semaphore, then one of those tasks (which one
depends on the scheduler being used) is allowed to lock the semaphore and
return from its sem_wait()
, sem_trywait()
, or
sem_timedwait()
call. If there are no other tasks waiting on the
semaphore, then the semaphore value is simply incremented. sem_post()
returns 0 upon successful completion.
If an error occurs, the function returns -1 and sets errno
to the
appropriate error code.
Multiprocessing is not supported in this implementation.
Copyright © 1988-2007OAR Corporation