[1/2] posixoptions.7: Expand XSI Options groups.

Message ID 2d6c47e9-0f34-c828-916e-a45fbf90f837@redhat.com
State New
Headers show
Series
  • [1/2] posixoptions.7: Expand XSI Options groups.
Related show

Commit Message

Carlos O'Donell April 12, 2018, 7:05 p.m.
We define in detail the X/Open System Interfaces i.e. _XOPEN_UNIX
and all of the X/Open System Interfaces (XSI) Options Groups.

The XSI options groups include encryption, realtime, advanced
realtime, realtime threads, advanced realtime threads, tracing,
streams, and leagcy interfaces.

Signed-off-by: Carlos O'Donell <carlos@redhat.com>

Comments

Michael Kerrisk (man-pages) April 13, 2018, 9:33 a.m. | #1
On 04/12/2018 09:05 PM, Carlos O'Donell wrote:
> We define in detail the X/Open System Interfaces i.e. _XOPEN_UNIX
> and all of the X/Open System Interfaces (XSI) Options Groups.
> 
> The XSI options groups include encryption, realtime, advanced
> realtime, realtime threads, advanced realtime threads, tracing,
> streams, and leagcy interfaces.
> 
> Signed-off-by: Carlos O'Donell <carlos@redhat.com>

Thanks, Carlos. Patch applied.

Cheers,

Michael
Rical Jasan April 14, 2018, 4:43 a.m. | #2
On 04/12/2018 12:05 PM, Carlos O'Donell wrote:
> +.B _POSIX_TRACE_INHERIT
> +options and defined to 200112L.

"are defined"?

> +The option may imply the
> +.B Encryption (_XOPEN_CRYPT),
> +.B Realtime (_XOPEN_REALTIME),
> +.B Advanced Raltime (ADB),

"Realtime"


Rical
Michael Kerrisk (man-pages) April 14, 2018, 5:37 a.m. | #3
On 14 April 2018 at 06:43, Rical Jasan <rj@2c3t.io> wrote:
> On 04/12/2018 12:05 PM, Carlos O'Donell wrote:
>> +.B _POSIX_TRACE_INHERIT
>> +options and defined to 200112L.
>
> "are defined"?
>
>> +The option may imply the
>> +.B Encryption (_XOPEN_CRYPT),
>> +.B Realtime (_XOPEN_REALTIME),
>> +.B Advanced Raltime (ADB),
>
> "Realtime"

Yup. Both already found and fixed.

Cheers,

Michael
Zack Weinberg April 16, 2018, 1:17 a.m. | #4
A related problem I just noticed: sysconf(3) says

| For options, typically, there is a constant
| .B _POSIX_FOO
| that may be defined in
| .IR <unistd.h> .
| If it is undefined, one should ask at run time.
| If it is defined to \-1, then the option is not supported.

But according to
<http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html#tag_13_77_03_02>,
undefined is the same as defined to -1: "If a symbolic constant is not
defined or is defined with the value -1, the option is not supported
for compilation."

zw

Patch

From eb192289fb958f427904dd2588aa0419e050bd6a Mon Sep 17 00:00:00 2001
From: Carlos O'Donell <carlos@systemhalted.org>
Date: Thu, 12 Apr 2018 13:33:00 -0500
Subject: [PATCH 1/2] posixoptions.7: Expand XSI Options groups.

We define in detail the X/Open System Interfaces i.e. _XOPEN_UNIX
and all of the X/Open System Interfaces (XSI) Options Groups.

The XSI options groups include encryption, realtime, advanced
realtime, realtime threads, advanced realtime threads, tracing,
streams, and leagcy interfaces.

Signed-off-by: Carlos O'Donell <carlos@redhat.com>
---
 man7/posixoptions.7 | 137 +++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 130 insertions(+), 7 deletions(-)

diff --git a/man7/posixoptions.7 b/man7/posixoptions.7
index 7e912beae..2c3f2fe96 100644
--- a/man7/posixoptions.7
+++ b/man7/posixoptions.7
@@ -779,13 +779,136 @@  The following functions are present:
 Always present (probably 0).
 Value to set a changeable special control
 character to indicate that it is disabled.
-.SH XOPEN EXTENSIONS
-.BR _XOPEN_CRYPT ,
-.BR _XOPEN_LEGACY ,
-.BR _XOPEN_REALTIME ,
-.BR _XOPEN_REALTIME_THREADS ,
-.BR _XOPEN_UNIX .
-.\" To be described.
+.SH X/OPEN SYSTEM INTERFACES EXTENSIONS
+.SS XSI - _XOPEN_CRYPT - _SC_XOPEN_CRYPT
+The following functions are present:
+.PP
+.nf
+.in +4n
+.IR crypt (),
+.IR encrypt (),
+.IR setkey ()
+.SS XSI - _XOPEN_REALTIME - _SC_XOPEN_REALTIME
+This option implies the
+.B _POSIX_ASYNCHRONOUS_IO == 200112L,
+.B _POSIX_FSYNC,
+.B _POSIX_MAPPED_FILES,
+.B _POSIX_MEMLOCK == 200112L,
+.B _POSIX_MEMLOCK_RANGE == 200112L,
+.B _POSIX_MEMORY_PROTECTION,
+.B _POSIX_MESSAGE_PASSING == 200112L,
+.B _POSIX_PRIORITIZED_IO,
+.B _POSIX_PRIORITY_SCHEDULING == 200112L,
+.B _POSIX_REALTIME_SIGNALS == 200112L,
+.B _POSIX_SEMAPHORES == 200112L,
+.B _POSIX_SHARED_MEMORY_OBJECTS == 200112L,
+.B _POSIX_SYNCHRONIZED_IO == 200112L,
+and
+.B _POSIX_TIMERS == 200112L
+options.
+.SS ADV - --- - ---
+The Advanced Realtime option group implies the
+.B _POSIX_ADVISORY_INFO,
+.B _POSIX_CLOCK_SELECTION (implies _POSIX_TIMERS),
+.B _POSIX_CPUTIME (implies _POSIX_TIMERS),
+.B _POSIX_MONOTONIC_CLOCK (implies _POSIX_TIMERS),
+.B _POSIX_SPAWN,
+.B _POSIX_SPORADIC_SERVER (implies _POSIX_PRIORITY_SCHEDULING),
+.B _POSIX_TIMEOUTS,
+and
+.B _POSIX_TYPED_MEMORY_OBJECTS
+options are all defined to 200112L.
+.SS XSI - _XOPEN_REALTIME_THREADS - _SC_XOPEN_REALTIME_THREADS
+This option implies the
+.B _POSIX_THREAD_PRIO_INHERIT,
+.B _POSIX_THREAD_PRIO_PROTECT,
+and
+.B _POSIX_THREAD_PRIORITY_SCHEDULING
+options are all defined to 200112L.
+.SS ADVANCED REALTIME THREADS - --- - ---
+The option implies the
+.B _POSIX_BARRIERS (implies _POSIX_THREADS, _POSIX_THREAD_SAFE_FUNCTIONS),
+.B _POSIX_SPIN_LOCKS (implies _POSIX_THREADS, _POSIX_THREAD_SAFE_FUNCTIONS),
+.B _POSIX_THREAD_CPUTIME (implies _POSIX_TIMERS),
+and
+.B _POSIX_THREAD_SPORADIC_SERVER (implies _POSIX_THREAD_PRIORITY_SCHEDULING)
+options are all defined to 200112L.
+.SS TRACING - --- - ---
+The option implies the
+.B _POSIX_TRACE,
+.B _POSIX_TRACE_EVENT_FILTER,
+.B _POSIX_TRACE_LOG,
+and
+.B _POSIX_TRACE_INHERIT
+options and defined to 200112L.
+.SS STREAMS - _XOPEN_STREAMS - _SC_XOPEN_STREAMS
+The following functions are present:
+.PP
+.nf
+.in +4n
+.IR fattach ()
+.IR fdetach ()
+.IR getmsg ()
+.IR getpmsg ()
+.IR ioctl ()
+.IR iastream ()
+.IR putmsg ()
+.IR putpmsg ()
+.SS XSI - _XOPEN_LEGACY - _SC_XOPEN_LEGACY
+Functions included in the legacy option group were previously mandatory,
+but are now optional in this version.
+The following functions are present:
+.PP
+.nf
+.in +4n
+.IR bcmp (),
+.IR bcopy (),
+.IR bzero (),
+.IR ecvt (),
+.IR fcvt (),
+.IR ftime (),
+.IR gcvt (),
+.IR getcwd (),
+.IR index (),
+.IR mktemp (),
+.IR rindex (),
+.IR utimes (),
+.IR wcswcs ()
+.SS XSI - _XOPEN_UNIX - _SC_XOPEN_UNIX
+The following functions are present:
+.PP
+.nf
+.in +4n
+.IR mmap (),
+.IR munmap (),
+and
+.IR msync.
+.in -4n
+.fi
+.PP
+The option implies the
+.B _POSIX_FSYNC,
+.B _POSIX_MAPPED_FILES,
+.B _POSIX_MEMORY_PROTECTION,
+.B _POSIX_THREAD_ATTR_STACKADDR,
+.B _POSIX_THREAD_ATTR_STACKSIZE,
+.B _POSIX_THREAD_PROCESS_SHARED,
+.B _POSIX_THREAD_SAFE_FUNCTIONS,
+and
+.B _POSIX_THREADS
+options.
+.PP
+The option may imply the
+.B Encryption (_XOPEN_CRYPT),
+.B Realtime (_XOPEN_REALTIME),
+.B Advanced Raltime (ADB),
+.B Realtime Threads (_XOPEN_REALTIME_THREADS),
+.B Advanced Realtime Threads (ADVANCED REALTIME THREADS),
+.B Tracing (TRACING),
+.B XSI Streams (STREAMS),
+and
+.B Legacy (_XOPEN_LEGACY)
+options from the XSI option groups.
 .SH SEE ALSO
 .BR sysconf (3),
 .BR standards (7)
-- 
2.14.3