sem_getvalue.3 (8e234adf862f8cda5ed370b933224162cc19527a) sem_getvalue.3 (096841eceb6f1e33621f6688cd52239f87d99c31)
1.\" Copyright (C) 2000 Jason Evans <jasone@freebsd.org>.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice(s), this list of conditions and the following disclaimer as

--- 55 unchanged lines hidden (view full) ---

64points to an invalid semaphore.
65.El
66.Sh SEE ALSO
67.Xr sem_post 3 ,
68.Xr sem_trywait 3 ,
69.Xr sem_wait 3
70.Sh STANDARDS
71.Fn sem_getvalue
1.\" Copyright (C) 2000 Jason Evans <jasone@freebsd.org>.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice(s), this list of conditions and the following disclaimer as

--- 55 unchanged lines hidden (view full) ---

64points to an invalid semaphore.
65.El
66.Sh SEE ALSO
67.Xr sem_post 3 ,
68.Xr sem_trywait 3 ,
69.Xr sem_wait 3
70.Sh STANDARDS
71.Fn sem_getvalue
72conforms to ISO/IEC 9945-1 ANSI/IEEE
73.Pq Dq Tn POSIX
74Std 1003.1 1996 Edition.
72conforms to
73.St -p1003.1-96 .
75.Pp
76The value of the semaphore is never negative, even if there are threads blocked
77on the semaphore. POSIX is somewhat ambiguous in its wording with regard to
78what the value of the semaphore should be if there are blocked waiting threads,
79but this behavior is conformant, given the wording of the specification.
74.Pp
75The value of the semaphore is never negative, even if there are threads blocked
76on the semaphore. POSIX is somewhat ambiguous in its wording with regard to
77what the value of the semaphore should be if there are blocked waiting threads,
78but this behavior is conformant, given the wording of the specification.