USCPSEMA(3P) USCPSEMA(3P) NAME uscpsema - conditionally acquires a semaphore C SYNOPSIS #include <ulocks.h> int uscpsema (usema_t *sema); DESCRIPTION uscpsema attempts to acquire the semaphore specified by sema. If the semaphore is not available (its count is less than zero), uscpsema returns immediately with an indication that the semaphore is not available. SEE ALSO usinitsema(3P), usnewsema(3P), uspsema(3P), ustestsema(3P), usvsema(3P). DIAGNOSTICS uscpsema returns a 0 if the semaphore is not acquired and 1 if the semaphore is acquired. uscpsema can only return an error (-1) if the internal semaphore data structure is corrupted. Page 1