*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: sem_getvalue | Section: 3 | Source: Digital UNIX | File: sem_getvalue.3.gz
sem_getvalue(3) Library Functions Manual sem_getvalue(3) NAME sem_getvalue - Get the value of a specified semaphore (P1003.1b). SYNOPSIS #include <semaphore.h> int sem_getvalue ( sem_t *sem, int *sval); PARAMETERS sem Pointer to a specific semaphore. sval References a location to be updated with the value of the semaphore indicated by the sem argument. DESCRIPTION The sem_getvalue function updates a location referenced by the sval ar- gument with the value of semaphore sem. The updated value represents an actual semaphore value that occurred during the call, but may not be the actual value of the semaphore at the time that the value is re- turned to the calling process. If the semaphore is locked, the value returned will either be zero or a negative number indicating the number of processes waiting for the sem- aphore at some time during the call. RETURN VALUES On a successful call, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate that an error occurred. ERRORS The sem_getvalue function fails under the following condition: [EINVAL] The sem argument does not refer to a valid semaphore. RELATED INFORMATION Functions: sem_post(3), sem_trywait(3), sem_wait(3) delim off sem_getvalue(3)

Navigation Options