sem_getvalue.3 (ddb4fb5b4456fd60b65d4cfd671ad987aa5a8547) sem_getvalue.3 (51f2ddd7af07ee09e4491db48435add85c117b4c)
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

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

56.Bl -tag -width Er
57.It Bq Er EINVAL
58.Fa sem
59points to an invalid semaphore.
60.El
61.Sh SEE ALSO
62.Xr sem_post 3 ,
63.Xr sem_trywait 3 ,
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

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

56.Bl -tag -width Er
57.It Bq Er EINVAL
58.Fa sem
59points to an invalid semaphore.
60.El
61.Sh SEE ALSO
62.Xr sem_post 3 ,
63.Xr sem_trywait 3 ,
64.Xr sem_wait 3
64.Xr sem_wait 3 ,
65.Xr sem 4
65.Sh STANDARDS
66.Fn sem_getvalue
67conforms to
68.St -p1003.1-96 .
69.Pp
70The value of the semaphore is never negative, even if there are threads blocked
71on the semaphore. POSIX is somewhat ambiguous in its wording with regard to
72what the value of the semaphore should be if there are blocked waiting threads,
73but this behavior is conformant, given the wording of the specification.
66.Sh STANDARDS
67.Fn sem_getvalue
68conforms to
69.St -p1003.1-96 .
70.Pp
71The value of the semaphore is never negative, even if there are threads blocked
72on the semaphore. POSIX is somewhat ambiguous in its wording with regard to
73what the value of the semaphore should be if there are blocked waiting threads,
74but this behavior is conformant, given the wording of the specification.