USCPSEMA(3P) USCPSEMA(3P)
uscpsema - conditionally acquires a semaphore
#include <ulocks.h>
int uscpsema (usema_t *sema);
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.
usinitsema(3P), usnewsema(3P), uspsema(3P), ustestsema(3P), usvsema(3P).
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.
PPPPaaaaggggeeee 1111 [ Back ]
|