Deleted Added
full compact
semctl.2 (108028) semctl.2 (108087)
1.\"
2.\" Copyright (c) 1995 David Hovemeyer <daveho@infocom.com>
3.\"
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:

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

18.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
1.\"
2.\" Copyright (c) 1995 David Hovemeyer <daveho@infocom.com>
3.\"
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:

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

18.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.\" $FreeBSD: head/lib/libc/sys/semctl.2 108028 2002-12-18 09:22:32Z ru $
26.\" $FreeBSD: head/lib/libc/sys/semctl.2 108087 2002-12-19 09:40:28Z ru $
27.\"
28.Dd September 12, 1995
29.Dt SEMCTL 2
30.Os
31.Sh NAME
32.Nm semctl
33.Nd control operations on a semaphore set
34.Sh LIBRARY

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

48on the semaphore set indicated by
49.Fa semid .
50A fourth argument, a
51.Fa "union semun arg" ,
52is required for certain values of
53.Fa cmd .
54For the commands that use the
55.Fa arg
27.\"
28.Dd September 12, 1995
29.Dt SEMCTL 2
30.Os
31.Sh NAME
32.Nm semctl
33.Nd control operations on a semaphore set
34.Sh LIBRARY

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

48on the semaphore set indicated by
49.Fa semid .
50A fourth argument, a
51.Fa "union semun arg" ,
52is required for certain values of
53.Fa cmd .
54For the commands that use the
55.Fa arg
56parameter,
56argument,
57.Fa "union semun"
58is defined as follows:
59.Bd -literal
60.\"
61.\" From <sys/sem.h>:
62.\"
63union semun {
64 int val; /* value for SETVAL */

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

131Set the values of all of the semaphores in the set to the values
132in the array pointed to by
133.Fa arg.array .
134Outstanding adjust on exit values for all semaphores in this set,
135in any process are cleared.
136.El
137.Pp
138The
57.Fa "union semun"
58is defined as follows:
59.Bd -literal
60.\"
61.\" From <sys/sem.h>:
62.\"
63union semun {
64 int val; /* value for SETVAL */

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

131Set the values of all of the semaphores in the set to the values
132in the array pointed to by
133.Fa arg.array .
134Outstanding adjust on exit values for all semaphores in this set,
135in any process are cleared.
136.El
137.Pp
138The
139.Fa "struct semid_ds"
139.Vt "struct semid_ds"
140is defined as follows:
141.Bd -literal
142.\"
143.\" Taken straight from <sys/sem.h>.
144.\"
145struct semid_ds {
146 struct ipc_perm sem_perm; /* operation permission struct */
147 struct sem *sem_base; /* pointer to first semaphore in set */

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

172.Fn semctl
173system call
174will fail if:
175.Bl -tag -width Er
176.It Bq Er EINVAL
177No semaphore set corresponds to
178.Fa semid .
179.It Bq Er EINVAL
140is defined as follows:
141.Bd -literal
142.\"
143.\" Taken straight from <sys/sem.h>.
144.\"
145struct semid_ds {
146 struct ipc_perm sem_perm; /* operation permission struct */
147 struct sem *sem_base; /* pointer to first semaphore in set */

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

172.Fn semctl
173system call
174will fail if:
175.Bl -tag -width Er
176.It Bq Er EINVAL
177No semaphore set corresponds to
178.Fa semid .
179.It Bq Er EINVAL
180The
180.Fa semnum
181.Fa semnum
182argument
181is not in the range of valid semaphores for given semaphore set.
182.It Bq Er EPERM
183The calling process's effective uid does not match the uid of
184the semaphore set's owner or creator.
185.It Bq Er EACCES
186Permission denied due to mismatch between operation and mode of
187semaphore set.
188.It Bq Er ERANGE

--- 12 unchanged lines hidden ---
183is not in the range of valid semaphores for given semaphore set.
184.It Bq Er EPERM
185The calling process's effective uid does not match the uid of
186the semaphore set's owner or creator.
187.It Bq Er EACCES
188Permission denied due to mismatch between operation and mode of
189semaphore set.
190.It Bq Er ERANGE

--- 12 unchanged lines hidden ---