sem_getvalue man page on OSF1

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
OSF1 logo
[printable version]

sem_getvalue(3)						       sem_getvalue(3)

NAME
       sem_getvalue - Gets the value of a specified semaphore (P1003.1b)

SYNOPSIS
       #include <semaphore.h>

       int sem_getvalue ( sem_t *sem, int *sval);

LIBRARY
       Realtime Library (librt.so, librt.a)

PARAMETERS
       Specifies  a  pointer  to  the  semaphore  for  which  a value is to be
       returned.  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
       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 sem‐
       aphore at some time during the call.

RETURN VALUES
       On  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.

ERRORS
       The  sem_getvalue function fails under the following condition: The sem
       argument does not refer to a valid semaphore.

SEE ALSO
       Functions: sem_post(3), sem_trywait(3), sem_wait(3)

       Guide to Realtime Programming

							       sem_getvalue(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server OSF1

List of man pages available for OSF1

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net