.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
-.\"
+.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
-.\"
+.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Added semid_ds and ipc_perm structure definitions
.\" 2005-08-02, mtk: Added IPC_INFO, SEM_INFO, SEM_STAT descriptions.
.\"
-.TH SEMCTL 2 2004-11-10 "Linux 2.6.9" "Linux Programmer's Manual"
+.TH SEMCTL 2 2004-11-10 "Linux 2.6.9" "Linux Programmer's Manual"
.SH NAME
semctl \- semaphore control operations
.SH SYNOPSIS
int val; /* Value for SETVAL */
struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */
unsigned short *array; /* Array for GETALL, SETALL */
- struct seminfo *__buf; /* Buffer for IPC_INFO
+ struct seminfo *__buf; /* Buffer for IPC_INFO
(Linux specific) */
};
.in -4n
updating also its
.I sem_ctime
member.
-The following members of the structure are updated:
+The following members of the structure are updated:
.IR sem_perm.uid ,
.IR sem_perm.gid ,
and (the least significant 9 bits of)
.IR sem_perm.mode .
The effective UID of the calling process must match the owner
.RI ( sem_perm.uid )
-or creator
+or creator
.RI ( sem_perm.cuid )
of the semaphore set, or the caller must be privileged.
The argument
is ignored.
.TP
.BR IPC_INFO " (Linux specific)"
-Returns information about system-wide semaphore limits and
+Returns information about system-wide semaphore limits and
parameters in the structure pointed to by
.IR arg.__buf .
This structure is of type
.in +2n
struct seminfo {
- int semmap; /* # of entries in semaphore map;
+ int semmap; /* # of entries in semaphore map;
unused */
int semmni; /* Max. # of semaphore sets */
- int semmns; /* Max. # of semaphores in all
+ int semmns; /* Max. # of semaphores in all
semaphore sets */
- int semmnu; /* System-wide max. # of undo
+ int semmnu; /* System-wide max. # of undo
structures; unused */
int semmsl; /* Max. # of semaphores in a set */
int semopm; /* Max. # of operations for semop() */
- int semume; /* Max. # of undo entries per
+ int semume; /* Max. # of undo entries per
process; unused */
int semusz; /* size of struct sem_undo */
int semvmx; /* Maximum semaphore value */
- int semaem; /* Max. value that can be recorded for
+ int semaem; /* Max. value that can be recorded for
semaphore adjustment (SEM_UNDO) */
};
.in -2n
.fi
-The
+The
.IR semmsl ,
.IR semmns ,
.IR semopm ,
settings can be changed via
.IR /proc/sys/kernel/sem ;
see
-.BR proc (5)
+.BR proc (5)
for details.
.TP
.BR SEM_INFO " (Linux specific)"
.I seminfo
structure containing the same information as for
.BR IPC_INFO ,
-except that the following fields are returned with information
+except that the following fields are returned with information
about system resources consumed by semaphores: the
.I semusz
-field returns the number of semaphore sets that currently exist
+field returns the number of semaphore sets that currently exist
on the system; and the
.I semaem
-field returns the total number of semaphores in all semaphore sets
+field returns the total number of semaphores in all semaphore sets
on the system.
.TP
.BR SEM_STAT " (Linux specific)"
-Returns a
-.I semid_ds
+Returns a
+.I semid_ds
structure as for
.BR IPC_STAT .
However, the
kernel's internal array recording information about all
semaphore sets.
(This information can be used with repeated
-.B SEM_STAT
+.B SEM_STAT
operations to obtain information about all semaphore sets on the system.)
.TP
.B SEM_INFO
-As for
+As for
.BR IPC_INFO .
.TP
.B SEM_STAT
.IR semid .
Or: for a
.B SEM_STAT
-operation, the index value specified in
+operation, the index value specified in
.I semid
referred to an array slot that is currently unused.
.TP