cvsema(D3X)
cvsema - conditionally perform a "V" or signal semaphore operation
As shipped in IRIX 6.5.30. Last changed in IRIX 6.5.19.
NAME cvsema - conditionally perform a "V" or signal semaphore operation SYNOPSIS #include "sys/types.h" #include "sys/sema.h" int cvsema(sema_t *semap); Arguments semap Expects a pointer to the semaphore you want cvsema to conditionally increment. DESCRIPTION cvsema routine conditionally performs a "V" operation depending on the current value of the semaphore. If the semaphore value is strictly less than 0, cvsema increments the semaphore value by 1 and wakes up a sleeping process. Otherwise, cvsema simply returns. cvsema effectively performs a "V" operation if there is a process asleep on the semaphore; otherwise, it does nothing. To initialize semaphores before you use them, call initnsema(D3X) or initnsema_mutex(D3X). Return Values cvsema returns 1 if the semaphore value is less than 0 and a process is awakened. Otherwise cvsema returns 0. See Also initnsema(D3X), initnsema_mutex(D3X), vsema(D3X)