Query: sem_getvalue
OS: osf1
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
sem_getvalue(3) Library Functions Manual sem_getvalue(3)NAMEsem_getvalue - Gets the value of a specified semaphore (P1003.1b)LIBRARYRealtime Library (librt.so, librt.a)SYNOPSIS#include <semaphore.h> int sem_getvalue ( sem_t *sem, int *sval);PARAMETERSsem Specifies a pointer to the semaphore for which a value is to be returned. sval References a location to be updated with the value of the semaphore indicated by the sem argument.DESCRIPTIONThe sem_getvalue function updates a location referenced by the sval argument 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 returned 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 semaphore at some time during the call.RETURN VALUESOn a successful call, a value of 0 (zero) is returned. Otherwise, a value of -1 is returned and errno is set to indicate that an error occurred.ERRORSThe sem_getvalue function fails under the following condition: [EINVAL] The sem argument does not refer to a valid semaphore.RELATED INFORMATIONFunctions: sem_post(3), sem_trywait(3), sem_wait(3) Guide to Realtime Programming delim off sem_getvalue(3)
Related Man Pages |
---|
sem_getvalue(3c) - opensolaris |
sem_getvalue(3) - debian |
sem_getvalue(3) - netbsd |
sem_wait(3) - osf1 |
sem_getvalue(3) - osx |
Similar Topics in the Unix Linux Community |
---|
Semaphore Segmentation Fault |
Determining which processes hold a semaphore |
RTM Realtime Monitoring |
Not Realtime |
Conditional deletion of files based on extension |