1POSIXOPTIONS(7)            Linux Programmer's Manual           POSIXOPTIONS(7)
2
3
4

NAME

6       posixoptions - optional parts of the POSIX standard
7

DESCRIPTION

9       The  POSIX  standard  (the  information  below  is  from  POSIX.1-2001)
10       describes a set of behaviors and interfaces  for  a  compliant  system.
11       However, many interfaces are optional and there are feature test macros
12       to test the availability of interfaces at compile time,  and  functions
13       sysconf(3),  fpathconf(3),  pathconf(3),  confstr(3)  to do this at run
14       time.  From shell scripts one can use getconf(1).  For more detail, see
15       sysconf(3).
16
17       We give the name of the POSIX abbreviation, the option, the name of the
18       sysconf() parameter used to inquire about the option,  and  possibly  a
19       very  short  description.  Much more precise detail can be found in the
20       POSIX standard itself, versions  of  which  can  nowadays  be  accessed
21       freely on the web.
22
23   ADV - _POSIX_ADVISORY_INFO - _SC_ADVISORY_INFO
24       The following advisory functions are present:
25
26           posix_fadvise(),
27           posix_fallocate(),
28           posix_memalign(),
29           posix_madvise().
30
31   AIO - _POSIX_ASYNCHRONOUS_IO - _SC_ASYNCHRONOUS_IO
32       The header <aio.h> is present.  The following functions are present:
33
34           aio_cancel(),
35           aio_error(),
36           aio_fsync(),
37           aio_read(),
38           aio_return(),
39           aio_suspend(),
40           aio_write(),
41           lio_listio().
42
43   BAR - _POSIX_BARRIERS - _SC_BARRIERS
44       This option implies the _POSIX_THREADS and _POSIX_THREAD_SAFE_FUNCTIONS
45       options.  The following functions are present:
46
47           pthread_barrier_destroy(),
48           pthread_barrier_init(),
49           pthread_barrier_wait(),
50           pthread_barrierattr_destroy(),
51           pthread_barrierattr_init().
52
53   --- - POSIX_CHOWN_RESTRICTED
54       If this option is in effect (as it always is under  POSIX.1-2001)  then
55       only root may change the owner of a file, and non-root can only set the
56       group of a file to one of the groups it belongs to.  This  affects  the
57       functions chown(), fchown().
58
59   CS - _POSIX_CLOCK_SELECTION - _SC_CLOCK_SELECTION
60       This  option implies the _POSIX_TIMERS option.  The following functions
61       are present:
62
63           pthread_condattr_getclock(),
64           pthread_condattr_setclock(),
65           clock_nanosleep().
66
67       If CLOCK_REALTIME is changed by the function clock_settime(), then this
68       affects all timers set for an absolute time.
69
70   CPT - _POSIX_CPUTIME - _SC_CPUTIME
71       The  clockID  CLOCK_PROCESS_CPUTIME_ID is supported.  The initial value
72       of this  clock  is  0  for  each  process.   This  option  implies  the
73       _POSIX_TIMERS option.  The function clock_getcpuclockid() is present.
74
75   --- - _POSIX_FILE_LOCKING - _SC_FILE_LOCKING
76       This option has been deleted.  Not in final XPG6.
77
78   FSC - _POSIX_FSYNC - _SC_FSYNC
79       The function fsync() is present.
80
81   IP6 - _POSIX_IPV6 - _SC_IPV6
82       Internet Protocol Version 6 is supported.
83
84   --- - _POSIX_JOB_CONTROL - _SC_JOB_CONTROL
85       If  this  option is in effect (as it always is under POSIX.1-2001) then
86       the system implements POSIX-style job control, and the following  func‐
87       tions are present:
88
89           setpgid(),
90           tcdrain(),
91           tcflush(),
92           tcgetpgrp(),
93           tcsendbreak(),
94           tcsetattr(),
95           tcsetpgrp().
96
97   MF - _POSIX_MAPPED_FILES - _SC_MAPPED_FILES
98       Shared  memory is supported.  The include file <sys/mman.h> is present.
99       The following functions are present: mmap(), msync(), munmap().
100
101   ML - _POSIX_MEMLOCK - _SC_MEMLOCK
102       Shared memory can be  locked  into  core.   The  functions  mlockall(),
103       munlockall() are present.
104
105   MR/MLR - _POSIX_MEMLOCK_RANGE - _SC_MEMLOCK_RANGE
106       More precisely, ranges can be locked into core.  The functions mlock(),
107       munlock() are present.
108
109   MPR - _POSIX_MEMORY_PROTECTION - _SC_MEMORY_PROTECTION
110       The function mprotect() is present.
111
112   MSG - _POSIX_MESSAGE_PASSING - _SC_MESSAGE_PASSING
113       The include file <mqueue.h> is present.  The  following  functions  are
114       present:
115
116           mq_close(),
117           mq_getattr(),
118           mq_notify(),
119           mq_open(),
120           mq_receive(),
121           mq_send(),
122           mq_setattr(),
123           mq_unlink().
124
125   MON - _POSIX_MONOTONIC_CLOCK - _SC_MONOTONIC_CLOCK
126       CLOCK_MONOTONIC  is  supported.   This option implies the _POSIX_TIMERS
127       option.  Affected functions are
128
129           aio_suspend(),
130           clock_getres(),
131           clock_gettime(),
132           clock_settime(),
133           timer_create().
134
135   --- - _POSIX_MULTI_PROCESS - _SC_MULTI_PROCESS
136       This option has been deleted.  Not in final XPG6.
137
138   --- - _POSIX_NO_TRUNC
139       If this option is in effect (as it always is under  POSIX.1-2001)  then
140       pathname components longer than NAME_MAX are not truncated, but give an
141       error.  This property may be dependent on the path prefix of the compo‐
142       nent.
143
144   PIO - _POSIX_PRIORITIZED_IO - _SC_PRIORITIZED_IO
145       This  option says that one can specify priorities for asynchronous I/O.
146       This affects the functions
147
148           aio_read(),
149           aio_write().
150
151   PS - _POSIX_PRIORITY_SCHEDULING - _SC_PRIORITY_SCHEDULING
152       The include file <sched.h> is present.   The  following  functions  are
153       present:
154
155           sched_get_priority_max(),
156           sched_get_priority_min(),
157           sched_getparam(),
158           sched_getscheduler(),
159           sched_rr_get_interval(),
160           sched_setparam(),
161           sched_setscheduler(),
162           sched_yield().
163
164       If  also  _POSIX_SPAWN  is  in effect, then the following functions are
165       present:
166
167           posix_spawnattr_getschedparam(),
168           posix_spawnattr_getschedpolicy(),
169           posix_spawnattr_setschedparam(),
170           posix_spawnattr_setschedpolicy().
171
172   RS - _POSIX_RAW_SOCKETS
173       Raw sockets are supported.  Affected functions are  getsockopt(),  set‐
174       sockopt().
175
176   --- - _POSIX_READER_WRITER_LOCKS - _SC_READER_WRITER_LOCKS
177       This  option  implies  the  _POSIX_THREADS  option.   Conversely, under
178       POSIX.1-2001 the _POSIX_THREADS option implies this option.
179       The following functions are present:
180
181           pthread_rwlock_destroy(),
182           pthread_rwlock_init(),
183           pthread_rwlock_rdlock(),
184           pthread_rwlock_tryrdlock(),
185           pthread_rwlock_trywrlock(),
186           pthread_rwlock_unlock(),
187           pthread_rwlock_wrlock(),
188           pthread_rwlockattr_destroy(),
189           pthread_rwlockattr_init().
190
191   RTS - _POSIX_REALTIME_SIGNALS - _SC_REALTIME_SIGNALS
192       Realtime signals are supported.  The following functions are present:
193
194           sigqueue(),
195           sigtimedwait(),
196           sigwaitinfo().
197
198   --- - _POSIX_REGEXP - _SC_REGEXP
199       If this option is in effect (as it always is under  POSIX.1-2001)  then
200       POSIX regular expressions are supported and the following functions are
201       present:
202
203           regcomp(),
204           regerror(),
205           regexec(),
206           regfree().
207
208   --- - _POSIX_SAVED_IDS - _SC_SAVED_IDS
209       If this option is in effect (as it always is under POSIX.1-2001) then a
210       process  has  a  saved  set-user-ID and a saved set-group-ID.  Affected
211       functions are
212
213           exec(),
214           kill(),
215           seteuid(),
216           setegid(),
217           setgid(),
218           setuid().
219
220   SEM - _POSIX_SEMAPHORES - _SC_SEMAPHORES
221       The include file <semaphore.h> is present.  The following functions are
222       present:
223
224           sem_close(),
225           sem_destroy(),
226           sem_getvalue(),
227           sem_init(),
228           sem_open(),
229           sem_post(),
230           sem_trywait(),
231           sem_unlink(),
232           sem_wait().
233
234   SHM - _POSIX_SHARED_MEMORY_OBJECTS - _SC_SHARED_MEMORY_OBJECTS
235       The following functions are present:
236
237           mmap(),
238           munmap(),
239           shm_open(),
240           shm_unlink().
241
242   --- - _POSIX_SHELL - _SC_SHELL
243       If  this  option is in effect (as it always is under POSIX.1-2001), the
244       function system() is present.
245
246   SPN - _POSIX_SPAWN - _SC_SPAWN
247       This option describes support for process creation in a  context  where
248       it  is  difficult  or impossible to use fork(), for example, because no
249       MMU is present.  If _POSIX_SPAWN is in effect, then  the  include  file
250       <spawn.h> and the following functions are present:
251
252           posix_spawn(),
253           posix_spawn_file_actions_addclose(),
254           posix_spawn_file_actions_adddup2(),
255           posix_spawn_file_actions_addopen(),
256           posix_spawn_file_actions_destroy(),
257           posix_spawn_file_actions_init(),
258           posix_spawnattr_destroy(),
259           posix_spawnattr_getsigdefault(),
260           posix_spawnattr_getflags(),
261           posix_spawnattr_getpgroup(),
262           posix_spawnattr_getsigmask(),
263           posix_spawnattr_init(),
264           posix_spawnattr_setsigdefault(),
265           posix_spawnattr_setflags(),
266           posix_spawnattr_setpgroup(),
267           posix_spawnattr_setsigmask(),
268           posix_spawnp().
269       If  also  _POSIX_PRIORITY_SCHEDULING  is  in effect, then the following
270       functions are present:
271
272           posix_spawnattr_getschedparam(),
273           posix_spawnattr_getschedpolicy(),
274           posix_spawnattr_setschedparam(),
275           posix_spawnattr_setschedpolicy().
276
277   SPI - _POSIX_SPIN_LOCKS - _SC_SPIN_LOCKS
278       This option implies the _POSIX_THREADS and _POSIX_THREAD_SAFE_FUNCTIONS
279       options.  The following functions are present:
280
281           pthread_spin_destroy(),
282           pthread_spin_init(),
283           pthread_spin_lock(),
284           pthread_spin_trylock(),
285           pthread_spin_unlock().
286
287   SS - _POSIX_SPORADIC_SERVER - _SC_SPORADIC_SERVER
288       The scheduling policy SCHED_SPORADIC is supported.  This option implies
289       the _POSIX_PRIORITY_SCHEDULING option.  Affected functions are
290
291           sched_setparam(),
292           sched_setscheduler().
293
294   SIO - _POSIX_SYNCHRONIZED_IO - _SC_SYNCHRONIZED_IO
295       Affected functions are open(), msync(), fsync(), fdatasync().
296
297   TSA - _POSIX_THREAD_ATTR_STACKADDR - _SC_THREAD_ATTR_STACKADDR
298       Affected functions are
299
300           pthread_attr_getstack(),
301           pthread_attr_getstackaddr(),
302           pthread_attr_setstack(),
303           pthread_attr_setstackaddr().
304
305   TSS - _POSIX_THREAD_ATTR_STACKSIZE - _SC_THREAD_ATTR_STACKSIZE
306       Affected functions are
307
308           pthread_attr_getstack(),
309           pthread_attr_getstacksize(),
310           pthread_attr_setstack(),
311           pthread_attr_setstacksize().
312
313   TCT - _POSIX_THREAD_CPUTIME - _SC_THREAD_CPUTIME
314       The clockID CLOCK_THREAD_CPUTIME_ID is supported.  This option  implies
315       the _POSIX_TIMERS option.  Affected functions are
316
317           pthread_getcpuclockid(),
318           clock_getres(),
319           clock_gettime(),
320           clock_settime(),
321           timer_create().
322
323   TPI - _POSIX_THREAD_PRIO_INHERIT - _SC_THREAD_PRIO_INHERIT
324       Affected functions are
325
326           pthread_mutexattr_getprotocol(),
327           pthread_mutexattr_setprotocol().
328
329   TPP - _POSIX_THREAD_PRIO_PROTECT - _SC_THREAD_PRIO_PROTECT
330       Affected functions are
331
332           pthread_mutex_getprioceiling(),
333           pthread_mutex_setprioceiling(),
334           pthread_mutexattr_getprioceiling(),
335           pthread_mutexattr_getprotocol(),
336           pthread_mutexattr_setprioceiling(),
337           pthread_mutexattr_setprotocol().
338
339   TPS - _POSIX_THREAD_PRIORITY_SCHEDULING - _SC_THREAD_PRIORITY_SCHEDULING
340       If this option is in effect, the different threads inside a process can
341       run with different priorities and/or  different  schedulers.   Affected
342       functions are
343
344           pthread_attr_getinheritsched(),
345           pthread_attr_getschedpolicy(),
346           pthread_attr_getscope(),
347           pthread_attr_setinheritsched(),
348           pthread_attr_setschedpolicy(),
349           pthread_attr_setscope(),
350           pthread_getschedparam(),
351           pthread_setschedparam(),
352           pthread_setschedprio().
353
354   TSH - _POSIX_THREAD_PROCESS_SHARED - _SC_THREAD_PROCESS_SHARED
355       Affected functions are
356
357           pthread_barrierattr_getpshared(),
358           pthread_barrierattr_setpshared(),
359           pthread_condattr_getpshared(),
360           pthread_condattr_setpshared(),
361           pthread_mutexattr_getpshared(),
362           pthread_mutexattr_setpshared(),
363           pthread_rwlockattr_getpshared(),
364           pthread_rwlockattr_setpshared().
365
366   TSF - _POSIX_THREAD_SAFE_FUNCTIONS - _SC_THREAD_SAFE_FUNCTIONS
367       Affected functions are
368
369           readdir_r(),
370           getgrgid_r(),
371           getgrnam_r(),
372           getpwnam_r(),
373           getpwuid_r(),
374           flockfile(),
375           ftrylockfile(),
376           funlockfile(),
377           getc_unlocked(),
378           getchar_unlocked(),
379           putc_unlocked(),
380           putchar_unlocked(),
381           rand_r(),
382           strerror_r(),
383           strtok_r(),
384           asctime_r(),
385           ctime_r(),
386           gmtime_r(),
387           localtime_r().
388
389   TSP - _POSIX_THREAD_SPORADIC_SERVER - _SC_THREAD_SPORADIC_SERVER
390       This   option  implies  the  _POSIX_THREAD_PRIORITY_SCHEDULING  option.
391       Affected functions are
392
393           sched_getparam(),
394           sched_setparam(),
395           sched_setscheduler().
396
397   THR - _POSIX_THREADS - _SC_THREADS
398       Basic support for POSIX threads is available.  The following  functions
399       are present:
400
401           pthread_atfork(),
402           pthread_attr_destroy(),
403           pthread_attr_getdetachstate(),
404           pthread_attr_getschedparam(),
405           pthread_attr_init(),
406           pthread_attr_setdetachstate(),
407           pthread_attr_setschedparam(),
408           pthread_cancel(),
409           pthread_cleanup_push(),
410           pthread_cleanup_pop(),
411           pthread_cond_broadcast(),
412           pthread_cond_destroy(),
413           pthread_cond_init(),
414           pthread_cond_signal(),
415           pthread_cond_timedwait(),
416           pthread_cond_wait(),
417           pthread_condattr_destroy(),
418           pthread_condattr_init(),
419           pthread_create(),
420           pthread_detach(),
421           pthread_equal(),
422           pthread_exit(),
423           pthread_getspecific(),
424           pthread_join(),
425           pthread_key_create(),
426           pthread_key_delete(),
427           pthread_mutex_destroy(),
428           pthread_mutex_init(),
429           pthread_mutex_lock(),
430           pthread_mutex_trylock(),
431           pthread_mutex_unlock(),
432           pthread_mutexattr_destroy(),
433           pthread_mutexattr_init(),
434           pthread_once(),
435           pthread_rwlock_destroy(),
436           pthread_rwlock_init(),
437           pthread_rwlock_rdlock(),
438           pthread_rwlock_tryrdlock(),
439           pthread_rwlock_trywrlock(),
440           pthread_rwlock_unlock(),
441           pthread_rwlock_wrlock(),
442           pthread_rwlockattr_destroy(),
443           pthread_rwlockattr_init(),
444           pthread_self(),
445           pthread_setcancelstate(),
446           pthread_setcanceltype(),
447           pthread_setspecific(),
448           pthread_testcancel().
449
450   TMO - _POSIX_TIMEOUTS - _SC_TIMEOUTS
451       The following functions are present:
452
453           mq_timedreceive(),
454           mq_timedsend(),
455           pthread_mutex_timedlock(),
456           pthread_rwlock_timedrdlock(),
457           pthread_rwlock_timedwrlock(),
458           sem_timedwait(),
459           posix_trace_timedgetnext_event().
460
461   TMR - _POSIX_TIMERS - _SC_TIMERS
462       The following functions are present:
463
464           clock_getres(),
465           clock_gettime(),
466           clock_settime(),
467           nanosleep(),
468           timer_create(),
469           timer_delete(),
470           timer_gettime(),
471           timer_getoverrun(),
472           timer_settime().
473
474   TRC - _POSIX_TRACE - _SC_TRACE
475       POSIX tracing is available.  The following functions are present:
476
477           posix_trace_attr_destroy(),
478           posix_trace_attr_getclockres(),
479           posix_trace_attr_getcreatetime(),
480           posix_trace_attr_getgenversion(),
481           posix_trace_attr_getmaxdatasize(),
482           posix_trace_attr_getmaxsystemeventsize(),
483           posix_trace_attr_getmaxusereventsize(),
484           posix_trace_attr_getname(),
485           posix_trace_attr_getstreamfullpolicy(),
486           posix_trace_attr_getstreamsize(),
487           posix_trace_attr_init(),
488           posix_trace_attr_setmaxdatasize(),
489           posix_trace_attr_setname(),
490           posix_trace_attr_setstreamsize(),
491           posix_trace_attr_setstreamfullpolicy(),
492           posix_trace_clear(),
493           posix_trace_create(),
494           posix_trace_event(),
495           posix_trace_eventid_equal(),
496           posix_trace_eventid_get_name(),
497           posix_trace_eventid_open(),
498           posix_trace_eventtypelist_getnext_id(),
499           posix_trace_eventtypelist_rewind(),
500           posix_trace_flush(),
501           posix_trace_get_attr(),
502           posix_trace_get_status(),
503           posix_trace_getnext_event(),
504           posix_trace_shutdown(),
505           posix_trace_start(),
506           posix_trace_stop(),
507           posix_trace_trygetnext_event().
508
509   TEF - _POSIX_TRACE_EVENT_FILTER - _SC_TRACE_EVENT_FILTER
510       This  option  implies the _POSIX_TRACE option.  The following functions
511       are present:
512
513           posix_trace_eventset_add(),
514           posix_trace_eventset_del(),
515           posix_trace_eventset_empty(),
516           posix_trace_eventset_fill(),
517           posix_trace_eventset_ismember(),
518           posix_trace_get_filter(),
519           posix_trace_set_filter(),
520           posix_trace_trid_eventid_open().
521
522   TRI - _POSIX_TRACE_INHERIT - _SC_TRACE_INHERIT
523       Tracing children of the  traced  process  is  supported.   This  option
524       implies the _POSIX_TRACE option.  The following functions are present:
525
526           posix_trace_attr_getinherited(),
527           posix_trace_attr_setinherited().
528
529   TRL - _POSIX_TRACE_LOG - _SC_TRACE_LOG
530       This  option  implies the _POSIX_TRACE option.  The following functions
531       are present:
532
533           posix_trace_attr_getlogfullpolicy(),
534           posix_trace_attr_getlogsize(),
535           posix_trace_attr_setlogfullpolicy(),
536           posix_trace_attr_setlogsize(),
537           posix_trace_close(),
538           posix_trace_create_withlog(),
539           posix_trace_open(),
540           posix_trace_rewind().
541
542   TYM - _POSIX_TYPED_MEMORY_OBJECTS - _SC_TYPED_MEMORY_OBJECT
543       The following functions are present:
544
545           posix_mem_offset(),
546           posix_typed_mem_get_info(),
547           posix_typed_mem_open().
548
549   --- - _POSIX_VDISABLE
550       Always present (probably 0).  Value to set a changeable special control
551       character to indicate that it is disabled.
552

XOPEN EXTENSIONS

554       _XOPEN_CRYPT,  _XOPEN_LEGACY, _XOPEN_REALTIME, _XOPEN_REALTIME_THREADS,
555       _XOPEN_UNIX.
556

SEE ALSO

558       sysconf(3), standards(7)
559

COLOPHON

561       This page is part of release 3.22 of the Linux  man-pages  project.   A
562       description  of  the project, and information about reporting bugs, can
563       be found at http://www.kernel.org/doc/man-pages/.
564
565
566
567                                  2007-12-21                   POSIXOPTIONS(7)
Impressum