GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SEM_GETVALUE (3)

NAME

sem_getvalue - get the value of a semaphore

CONTENTS

Library
Synopsis
Description
Return Values
Errors
See Also
Standards

LIBRARY


.Lb libc

SYNOPSIS


.In semaphore.h int sem_getvalue sem_t * restrict sem int * restrict sval

DESCRIPTION

The sem_getvalue function sets the variable pointed to by sval to the current value of the semaphore pointed to by sem, as of the time that the call to sem_getvalue is actually run.

RETURN VALUES


.Rv -std sem_getvalue

ERRORS

The sem_getvalue function will fail if:
[EINVAL]
  The sem argument points to an invalid semaphore.

SEE ALSO

sem_post(3), sem_trywait(3), sem_wait(3), sem(4)

STANDARDS

The sem_getvalue function conforms to -p1003.1-96.

The value of the semaphore is never negative, even if there are threads blocked on the semaphore. POSIX is somewhat ambiguous in its wording with regard to what the value of the semaphore should be if there are blocked waiting threads, but this behavior is conformant, given the wording of the specification.

Search for    or go to Top of page |  Section 3 |  Main Index


Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.