semget.2: NOTES: Add a subheading and reorder paragraphs

(No content changes.)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-05-15 15:08:25 +02:00
parent 098c4f6411
commit b93dd595bc
1 changed files with 24 additions and 24 deletions

View File

@ -212,7 +212,30 @@ SVr4, POSIX.1-2001.
.\" SVr4 documents additional error conditions EFBIG, E2BIG, EAGAIN,
.\" ERANGE, EFAULT.
.SH NOTES
.PP
The inclusion of
.I <sys/types.h>
and
.I <sys/ipc.h>
isn't required on Linux or by any version of POSIX.
However,
some old implementations required the inclusion of these header files,
and the SVID also documented their inclusion.
Applications intended to be portable to such old systems may need
to include these header files.
.\" Like Linux, the FreeBSD man pages still document
.\" the inclusion of these header files.
.B IPC_PRIVATE
isn't a flag field but a
.I key_t
type.
If this special value is used for
.IR key ,
the system call ignores all but the least significant 9 bits of
.I semflg
and creates a new semaphore set (on success).
.\"
.SS Semaphore initialization
The values of the semaphores in a newly created set are indeterminate.
(POSIX.1-2001 and POSIX.1-2008 are explicit on this point,
although POSIX.1-2008 notes that a future version of the standard
@ -237,29 +260,6 @@ in the associated data structure retrieved by a
.BR semctl (2)
.B IPC_STAT
operation can be used to avoid races.)
The inclusion of
.I <sys/types.h>
and
.I <sys/ipc.h>
isn't required on Linux or by any version of POSIX.
However,
some old implementations required the inclusion of these header files,
and the SVID also documented their inclusion.
Applications intended to be portable to such old systems may need
to include these header files.
.\" Like Linux, the FreeBSD man pages still document
.\" the inclusion of these header files.
.B IPC_PRIVATE
isn't a flag field but a
.I key_t
type.
If this special value is used for
.IR key ,
the system call ignores all but the least significant 9 bits of
.I semflg
and creates a new semaphore set (on success).
.\"
.SS Semaphore limits
The following limits on semaphore set resources affect the