summaryrefslogtreecommitdiffstats
path: root/man2/semget.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/semget.2')
-rw-r--r--man2/semget.236
1 files changed, 18 insertions, 18 deletions
diff --git a/man2/semget.2 b/man2/semget.2
index 167957b3a..cc63e8d3b 100644
--- a/man2/semget.2
+++ b/man2/semget.2
@@ -73,7 +73,7 @@ set to
(This is analogous to the effect of the combination
.B O_CREAT | O_EXCL
for
-.BR open (2).)
+.MR open 2 .)
.P
Upon creation, the least significant 9 bits of the argument
.I semflg
@@ -83,7 +83,7 @@ These bits have the same format, and the same
meaning, as the
.I mode
argument of
-.BR open (2)
+.MR open 2
(though the execute permissions are
not meaningful for semaphores, and write permissions mean permission
to alter semaphore values).
@@ -93,7 +93,7 @@ When creating a new semaphore set,
initializes the set's associated data structure,
.I semid_ds
(see
-.BR semctl (2)),
+.MR semctl 2 ),
as follows:
.IP \[bu] 3
.I sem_perm.cuid
@@ -227,7 +227,7 @@ it should explicitly initialize the semaphores to the desired values.
.\" implementation out there that does not.
.P
Initialization can be done using
-.BR semctl (2)
+.MR semctl 2
.B SETVAL
or
.B SETALL
@@ -236,7 +236,7 @@ Where multiple peers do not know who will be the first to
initialize the set, checking for a nonzero
.I sem_otime
in the associated data structure retrieved by a
-.BR semctl (2)
+.MR semctl 2
.B IPC_STAT
operation can be used to avoid races.
.\"
@@ -290,13 +290,13 @@ It generates the
for
.BR semget ()
using
-.BR ftok (3).
+.MR ftok 3 .
The first two command-line arguments are used as the
.I pathname
and
.I proj_id
arguments for
-.BR ftok (3).
+.MR ftok 3 .
The third command-line argument is an integer that specifies the
.I nsems
argument for
@@ -312,9 +312,9 @@ flags for the call to
The usage of this program is demonstrated below.
.P
We first create two files that will be used to generate keys using
-.BR ftok (3),
+.MR ftok 3 ,
create two semaphore sets using those files, and then list the sets using
-.BR ipcs (1):
+.MR ipcs 1 :
.P
.in +4n
.EX
@@ -333,11 +333,11 @@ key semid owner perms nsems
.in
.P
Next, we demonstrate that when
-.BR semctl (2)
+.MR semctl 2
is given the same
.I key
(as generated by the same arguments to
-.BR ftok (3)),
+.MR ftok 3 ),
it returns the ID of the already existing semaphore set:
.P
.in +4n
@@ -348,7 +348,7 @@ ID = 9
.in
.P
Finally, we demonstrate the kind of collision that can occur when
-.BR ftok (3)
+.MR ftok 3
is given different
.I pathname
arguments that have the same inode number:
@@ -426,9 +426,9 @@ main(int argc, char *argv[])
.EE
.\" SRC END
.SH SEE ALSO
-.BR semctl (2),
-.BR semop (2),
-.BR ftok (3),
-.BR capabilities (7),
-.BR sem_overview (7),
-.BR sysvipc (7)
+.MR semctl 2 ,
+.MR semop 2 ,
+.MR ftok 3 ,
+.MR capabilities 7 ,
+.MR sem_overview 7 ,
+.MR sysvipc 7