| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: sem_getvalue.3,v 1.3 2012/03/08 21:59:29 joerg Exp $ | | 1 | .\" $NetBSD: sem_getvalue.3,v 1.4 2012/03/08 22:12:37 wiz Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (C) 2000 Jason Evans <jasone@FreeBSD.org>. | | 3 | .\" Copyright (C) 2000 Jason Evans <jasone@FreeBSD.org>. |
4 | .\" All rights reserved. | | 4 | .\" All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" Redistribution and use in source and binary forms, with or without | | 6 | .\" Redistribution and use in source and binary forms, with or without |
7 | .\" modification, are permitted provided that the following conditions | | 7 | .\" modification, are permitted provided that the following conditions |
8 | .\" are met: | | 8 | .\" are met: |
9 | .\" 1. Redistributions of source code must retain the above copyright | | 9 | .\" 1. Redistributions of source code must retain the above copyright |
10 | .\" notice(s), this list of conditions and the following disclaimer as | | 10 | .\" notice(s), this list of conditions and the following disclaimer as |
11 | .\" the first lines of this file unmodified other than the possible | | 11 | .\" the first lines of this file unmodified other than the possible |
12 | .\" addition of one or more copyright notices. | | 12 | .\" addition of one or more copyright notices. |
13 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 13 | .\" 2. Redistributions in binary form must reproduce the above copyright |
14 | .\" notice(s), this list of conditions and the following disclaimer in | | 14 | .\" notice(s), this list of conditions and the following disclaimer in |
| @@ -51,26 +51,26 @@ as of the time that the call to | | | @@ -51,26 +51,26 @@ as of the time that the call to |
51 | is actually run. | | 51 | is actually run. |
52 | .Sh RETURN VALUES | | 52 | .Sh RETURN VALUES |
53 | .Rv -std sem_getvalue | | 53 | .Rv -std sem_getvalue |
54 | .Sh ERRORS | | 54 | .Sh ERRORS |
55 | .Fn sem_getvalue | | 55 | .Fn sem_getvalue |
56 | will fail if: | | 56 | will fail if: |
57 | .Bl -tag -width Er | | 57 | .Bl -tag -width Er |
58 | .It Bq Er EINVAL | | 58 | .It Bq Er EINVAL |
59 | .Fa sem | | 59 | .Fa sem |
60 | points to an invalid semaphore. | | 60 | points to an invalid semaphore. |
61 | .El | | 61 | .El |
62 | .Sh SEE ALSO | | 62 | .Sh SEE ALSO |
63 | .Xr sem_post 3 , | | 63 | .Xr sem_post 3 , |
64 | .Xr sem_timedwait 3 | | 64 | .Xr sem_timedwait 3 , |
65 | .Xr sem_trywait 3 , | | 65 | .Xr sem_trywait 3 , |
66 | .Xr sem_wait 3 | | 66 | .Xr sem_wait 3 |
67 | .Sh STANDARDS | | 67 | .Sh STANDARDS |
68 | .Fn sem_getvalue | | 68 | .Fn sem_getvalue |
69 | conforms to | | 69 | conforms to |
70 | .St -p1003.1-96 . | | 70 | .St -p1003.1-96 . |
71 | .Pp | | 71 | .Pp |
72 | The value of the semaphore is never negative, even if there are threads blocked | | 72 | The value of the semaphore is never negative, even if there are threads blocked |
73 | on the semaphore. | | 73 | on the semaphore. |
74 | POSIX is somewhat ambiguous in its wording with regard to | | 74 | POSIX is somewhat ambiguous in its wording with regard to |
75 | what the value of the semaphore should be if there are blocked waiting threads, | | 75 | what the value of the semaphore should be if there are blocked waiting threads, |
76 | but this behavior is conformant, given the wording of the specification. | | 76 | but this behavior is conformant, given the wording of the specification. |