Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
sysconf.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024, Meta
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef ZEPHYR_INCLUDE_POSIX_SYS_SYSCONF_H_
7#define ZEPHYR_INCLUDE_POSIX_SYS_SYSCONF_H_
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13#ifdef CONFIG_POSIX_SYSCONF
14
15enum {
16 _SC_ADVISORY_INFO,
17 _SC_ASYNCHRONOUS_IO,
18 _SC_BARRIERS,
19 _SC_CLOCK_SELECTION,
20 _SC_CPUTIME,
21 _SC_FSYNC,
22 _SC_IPV6,
23 _SC_JOB_CONTROL,
24 _SC_MAPPED_FILE,
25 _SC_MEMLOCK,
26 _SC_MEMLOCK_RANGE,
27 _SC_MEMORY_PROTECTION,
28 _SC_MESSAGE_PASSING,
29 _SC_MONOTONIC_CLOCK,
30 _SC_PRIORITIZED_IO,
31 _SC_PRIORITY_SCHEDULING,
32 _SC_RAW_SOCKETS,
33 _SC_RE_DUP_MAX,
34 _SC_READER_WRITER_LOCKS,
35 _SC_REALTIME_SIGNALS,
36 _SC_REGEXP,
37 _SC_SAVED_IDS,
38 _SC_SEMAPHORES,
39 _SC_SHARED_MEMORY_OBJECTS,
40 _SC_SHELL,
41 _SC_SPAWN,
42 _SC_SPIN_LOCKS,
43 _SC_SPORADIC_SERVER,
44 _SC_SS_REPL_MAX,
45 _SC_SYNCHRONIZED_IO,
46 _SC_THREAD_ATTR_STACKADDR,
47 _SC_THREAD_ATTR_STACKSIZE,
48 _SC_THREAD_CPUTIME,
49 _SC_THREAD_PRIO_INHERIT,
50 _SC_THREAD_PRIO_PROTECT,
51 _SC_THREAD_PRIORITY_SCHEDULING,
52 _SC_THREAD_PROCESS_SHARED,
53 _SC_THREAD_ROBUST_PRIO_INHERIT,
54 _SC_THREAD_ROBUST_PRIO_PROTECT,
55 _SC_THREAD_SAFE_FUNCTIONS,
56 _SC_THREAD_SPORADIC_SERVER,
57 _SC_THREADS,
58 _SC_TIMEOUTS,
59 _SC_TIMERS,
60 _SC_TRACE,
61 _SC_TRACE_EVENT_FILTER,
62 _SC_TRACE_EVENT_NAME_MAX,
63 _SC_TRACE_INHERIT,
64 _SC_TRACE_LOG,
65 _SC_TRACE_NAME_MAX,
66 _SC_TRACE_SYS_MAX,
67 _SC_TRACE_USER_EVENT_MAX,
68 _SC_TYPED_MEMORY_OBJECTS,
69 _SC_VERSION,
70 _SC_V7_ILP32_OFF32,
71 _SC_V7_ILP32_OFFBIG,
72 _SC_V7_LP64_OFF64,
73 _SC_V7_LPBIG_OFFBIG,
74 _SC_V6_ILP32_OFF32,
75 _SC_V6_ILP32_OFFBIG,
76 _SC_V6_LP64_OFF64,
77 _SC_V6_LPBIG_OFFBIG,
78 _SC_BC_BASE_MAX,
79 _SC_BC_DIM_MAX,
80 _SC_BC_SCALE_MAX,
81 _SC_BC_STRING_MAX,
82 _SC_2_C_BIND,
83 _SC_2_C_DEV,
84 _SC_2_CHAR_TERM,
85 _SC_COLL_WEIGHTS_MAX,
86 _SC_DELAYTIMER_MAX,
87 _SC_EXPR_NEST_MAX,
88 _SC_2_FORT_DEV,
89 _SC_2_FORT_RUN,
90 _SC_LINE_MAX,
91 _SC_2_LOCALEDEF,
92 _SC_2_PBS,
93 _SC_2_PBS_ACCOUNTING,
94 _SC_2_PBS_CHECKPOINT,
95 _SC_2_PBS_LOCATE,
96 _SC_2_PBS_MESSAGE,
97 _SC_2_PBS_TRACK,
98 _SC_2_SW_DEV,
99 _SC_2_UPE,
100 _SC_2_VERSION,
101 _SC_XOPEN_CRYPT,
102 _SC_XOPEN_ENH_I18N,
103 _SC_XOPEN_REALTIME,
104 _SC_XOPEN_REALTIME_THREADS,
105 _SC_XOPEN_SHM,
106 _SC_XOPEN_STREAMS,
107 _SC_XOPEN_UNIX,
108 _SC_XOPEN_UUCP,
109 _SC_XOPEN_VERSION,
110 _SC_CLK_TCK,
111 _SC_GETGR_R_SIZE_MAX,
112 _SC_GETPW_R_SIZE_MAX,
113 _SC_AIO_LISTIO_MAX,
114 _SC_AIO_MAX,
115 _SC_AIO_PRIO_DELTA_MAX,
116 _SC_ARG_MAX,
117 _SC_ATEXIT_MAX,
118 _SC_CHILD_MAX,
119 _SC_HOST_NAME_MAX,
120 _SC_IOV_MAX,
121 _SC_LOGIN_NAME_MAX,
122 _SC_NGROUPS_MAX,
123 _SC_MQ_OPEN_MAX,
124 _SC_MQ_PRIO_MAX,
125 _SC_OPEN_MAX,
126 _SC_PAGE_SIZE,
127 _SC_PAGESIZE,
128 _SC_THREAD_DESTRUCTOR_ITERATIONS,
129 _SC_THREAD_KEYS_MAX,
130 _SC_THREAD_STACK_MIN,
131 _SC_THREAD_THREADS_MAX,
132 _SC_RTSIG_MAX,
133 _SC_SEM_NSEMS_MAX,
134 _SC_SEM_VALUE_MAX,
135 _SC_SIGQUEUE_MAX,
136 _SC_STREAM_MAX,
137 _SC_SYMLOOP_MAX,
138 _SC_TIMER_MAX,
139 _SC_TTY_NAME_MAX,
140 _SC_TZNAME_MAX,
141};
142
143#ifdef CONFIG_POSIX_SYSCONF_IMPL_MACRO
144#define __z_posix_sysconf_SC_ADVISORY_INFO _POSIX_ADVISORY_INFO
145#define __z_posix_sysconf_SC_ASYNCHRONOUS_IO _POSIX_ASYNCHRONOUS_IO
146#define __z_posix_sysconf_SC_BARRIERS _POSIX_BARRIERS
147#define __z_posix_sysconf_SC_CLOCK_SELECTION _POSIX_CLOCK_SELECTION
148#define __z_posix_sysconf_SC_CPUTIME _POSIX_CPUTIME
149#define __z_posix_sysconf_SC_FSYNC _POSIX_FSYNC
150#define __z_posix_sysconf_SC_IPV6 _POSIX_IPV6
151#define __z_posix_sysconf_SC_JOB_CONTROL _POSIX_JOB_CONTROL
152#define __z_posix_sysconf_SC_MAPPED_FILE _POSIX_MAPPED_FILES
153#define __z_posix_sysconf_SC_MEMLOCK _POSIX_MEMLOCK
154#define __z_posix_sysconf_SC_MEMLOCK_RANGE _POSIX_MEMLOCK_RANGE
155#define __z_posix_sysconf_SC_MEMORY_PROTECTION _POSIX_MEMORY_PROTECTION
156#define __z_posix_sysconf_SC_MESSAGE_PASSING _POSIX_MESSAGE_PASSING
157#define __z_posix_sysconf_SC_MONOTONIC_CLOCK _POSIX_MONOTONIC_CLOCK
158#define __z_posix_sysconf_SC_PRIORITIZED_IO _POSIX_PRIORITIZED_IO
159#define __z_posix_sysconf_SC_PRIORITY_SCHEDULING _POSIX_PRIORITY_SCHEDULING
160#define __z_posix_sysconf_SC_RAW_SOCKETS _POSIX_RAW_SOCKETS
161#define __z_posix_sysconf_SC_RE_DUP_MAX _POSIX_RE_DUP_MAX
162#define __z_posix_sysconf_SC_READER_WRITER_LOCKS _POSIX_READER_WRITER_LOCKS
163#define __z_posix_sysconf_SC_REALTIME_SIGNALS _POSIX_REALTIME_SIGNALS
164#define __z_posix_sysconf_SC_REGEXP _POSIX_REGEXP
165#define __z_posix_sysconf_SC_SAVED_IDS _POSIX_SAVED_IDS
166#define __z_posix_sysconf_SC_SEMAPHORES _POSIX_SEMAPHORES
167#define __z_posix_sysconf_SC_SHARED_MEMORY_OBJECTS _POSIX_SHARED_MEMORY_OBJECTS
168#define __z_posix_sysconf_SC_SHELL _POSIX_SHELL
169#define __z_posix_sysconf_SC_SPAWN _POSIX_SPAWN
170#define __z_posix_sysconf_SC_SPIN_LOCKS _POSIX_SPIN_LOCKS
171#define __z_posix_sysconf_SC_SPORADIC_SERVER _POSIX_SPORADIC_SERVER
172#define __z_posix_sysconf_SC_SS_REPL_MAX _POSIX_SS_REPL_MAX
173#define __z_posix_sysconf_SC_SYNCHRONIZED_IO _POSIX_SYNCHRONIZED_IO
174#define __z_posix_sysconf_SC_THREAD_ATTR_STACKADDR _POSIX_THREAD_ATTR_STACKADDR
175#define __z_posix_sysconf_SC_THREAD_ATTR_STACKSIZE _POSIX_THREAD_ATTR_STACKSIZE
176#define __z_posix_sysconf_SC_THREAD_CPUTIME _POSIX_THREAD_CPUTIME
177#define __z_posix_sysconf_SC_THREAD_PRIO_INHERIT _POSIX_THREAD_PRIO_INHERIT
178#define __z_posix_sysconf_SC_THREAD_PRIO_PROTECT _POSIX_THREAD_PRIO_PROTECT
179#define __z_posix_sysconf_SC_THREAD_PRIORITY_SCHEDULING _POSIX_THREAD_PRIORITY_SCHEDULING
180#define __z_posix_sysconf_SC_THREAD_PROCESS_SHARED _POSIX_THREAD_PROCESS_SHARED
181#define __z_posix_sysconf_SC_THREAD_ROBUST_PRIO_INHERIT _POSIX_THREAD_ROBUST_PRIO_INHERIT
182#define __z_posix_sysconf_SC_THREAD_ROBUST_PRIO_PROTECT _POSIX_THREAD_ROBUST_PRIO_PROTECT
183#define __z_posix_sysconf_SC_THREAD_SAFE_FUNCTIONS _POSIX_THREAD_SAFE_FUNCTIONS
184#define __z_posix_sysconf_SC_THREAD_SPORADIC_SERVER _POSIX_THREAD_SPORADIC_SERVER
185#define __z_posix_sysconf_SC_THREADS _POSIX_THREADS
186#define __z_posix_sysconf_SC_TIMEOUTS _POSIX_TIMEOUTS
187#define __z_posix_sysconf_SC_TIMERS _POSIX_TIMERS
188#define __z_posix_sysconf_SC_TRACE _POSIX_TRACE
189#define __z_posix_sysconf_SC_TRACE_EVENT_FILTER _POSIX_TRACE_EVENT_FILTER
190#define __z_posix_sysconf_SC_TRACE_EVENT_NAME_MAX _POSIX_TRACE_EVENT_NAME_MAX
191#define __z_posix_sysconf_SC_TRACE_INHERIT _POSIX_TRACE_INHERIT
192#define __z_posix_sysconf_SC_TRACE_LOG _POSIX_TRACE_LOG
193#define __z_posix_sysconf_SC_TRACE_NAME_MAX _POSIX_TRACE_NAME_MAX
194#define __z_posix_sysconf_SC_TRACE_SYS_MAX _POSIX_TRACE_SYS_MAX
195#define __z_posix_sysconf_SC_TRACE_USER_EVENT_MAX _POSIX_TRACE_USER_EVENT_MAX
196#define __z_posix_sysconf_SC_TYPED_MEMORY_OBJECTS _POSIX_TYPED_MEMORY_OBJECTS
197#define __z_posix_sysconf_SC_VERSION _POSIX_VERSION
198#define __z_posix_sysconf_SC_V7_ILP32_OFF32 _POSIX_V7_ILP32_OFF32
199#define __z_posix_sysconf_SC_V7_ILP32_OFFBIG _POSIX_V7_ILP32_OFFBIG
200#define __z_posix_sysconf_SC_V7_LP64_OFF64 _POSIX_V7_LP64_OFF64
201#define __z_posix_sysconf_SC_V7_LPBIG_OFFBIG _POSIX_V7_LPBIG_OFFBIG
202#define __z_posix_sysconf_SC_V6_ILP32_OFF32 _POSIX_V6_ILP32_OFF32
203#define __z_posix_sysconf_SC_V6_ILP32_OFFBIG _POSIX_V6_ILP32_OFFBIG
204#define __z_posix_sysconf_SC_V6_LP64_OFF64 _POSIX_V6_LP64_OFF64
205#define __z_posix_sysconf_SC_V6_LPBIG_OFFBIG _POSIX_V6_LPBIG_OFFBIG
206#define __z_posix_sysconf_SC_BC_BASE_MAX _POSIX2_BC_BASE_MAX
207#define __z_posix_sysconf_SC_BC_DIM_MAX _POSIX2_BC_DIM_MAX
208#define __z_posix_sysconf_SC_BC_SCALE_MAX _POSIX2_BC_SCALE_MAX
209#define __z_posix_sysconf_SC_BC_STRING_MAX _POSIX2_BC_STRING_MAX
210#define __z_posix_sysconf_SC_2_C_BIND _POSIX2_C_BIND
211#define __z_posix_sysconf_SC_2_C_DEV _POSIX2_C_DEV
212#define __z_posix_sysconf_SC_2_CHAR_TERM _POSIX2_CHAR_TERM
213#define __z_posix_sysconf_SC_COLL_WEIGHTS_MAX _POSIX2_COLL_WEIGHTS_MAX
214#define __z_posix_sysconf_SC_DELAYTIMER_MAX _POSIX2_DELAYTIMER_MAX
215#define __z_posix_sysconf_SC_EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX
216#define __z_posix_sysconf_SC_2_FORT_DEV _POSIX2_FORT_DEV
217#define __z_posix_sysconf_SC_2_FORT_RUN _POSIX2_FORT_RUN
218#define __z_posix_sysconf_SC_LINE_MAX _POSIX2_LINE_MAX
219#define __z_posix_sysconf_SC_2_LOCALEDEF _POSIX2_LOCALEDEF
220#define __z_posix_sysconf_SC_2_PBS _POSIX2_PBS
221#define __z_posix_sysconf_SC_2_PBS_ACCOUNTING _POSIX2_PBS_ACCOUNTING
222#define __z_posix_sysconf_SC_2_PBS_CHECKPOINT _POSIX2_PBS_CHECKPOINT
223#define __z_posix_sysconf_SC_2_PBS_LOCATE _POSIX2_PBS_LOCATE
224#define __z_posix_sysconf_SC_2_PBS_MESSAGE _POSIX2_PBS_MESSAGE
225#define __z_posix_sysconf_SC_2_PBS_TRACK _POSIX2_PBS_TRACK
226#define __z_posix_sysconf_SC_2_SW_DEV _POSIX2_SW_DEV
227#define __z_posix_sysconf_SC_2_UPE _POSIX2_UPE
228#define __z_posix_sysconf_SC_2_VERSION _POSIX2_VERSION
229#define __z_posix_sysconf_SC_XOPEN_CRYPT _XOPEN_CRYPT
230#define __z_posix_sysconf_SC_XOPEN_ENH_I18N _XOPEN_ENH_I18N
231#define __z_posix_sysconf_SC_XOPEN_REALTIME _XOPEN_REALTIME
232#define __z_posix_sysconf_SC_XOPEN_REALTIME_THREADS _XOPEN_REALTIME_THREADS
233#define __z_posix_sysconf_SC_XOPEN_SHM _XOPEN_SHM
234#define __z_posix_sysconf_SC_XOPEN_STREAMS _XOPEN_STREAMS
235#define __z_posix_sysconf_SC_XOPEN_UNIX _XOPEN_UNIX
236#define __z_posix_sysconf_SC_XOPEN_UUCP _XOPEN_UUCP
237#define __z_posix_sysconf_SC_XOPEN_VERSION _XOPEN_VERSION
238#define __z_posix_sysconf_SC_CLK_TCK (100L)
239#define __z_posix_sysconf_SC_GETGR_R_SIZE_MAX (0L)
240#define __z_posix_sysconf_SC_GETPW_R_SIZE_MAX (0L)
241#define __z_posix_sysconf_SC_AIO_LISTIO_MAX AIO_LISTIO_MAX
242#define __z_posix_sysconf_SC_AIO_MAX AIO_MAX
243#define __z_posix_sysconf_SC_AIO_PRIO_DELTA_MAX AIO_PRIO_DELTA_MAX
244#define __z_posix_sysconf_SC_ARG_MAX ARG_MAX
245#define __z_posix_sysconf_SC_ATEXIT_MAX ATEXIT_MAX
246#define __z_posix_sysconf_SC_CHILD_MAX CHILD_MAX
247#define __z_posix_sysconf_SC_HOST_NAME_MAX HOST_NAME_MAX
248#define __z_posix_sysconf_SC_IOV_MAX IOV_MAX
249#define __z_posix_sysconf_SC_LOGIN_NAME_MAX LOGIN_NAME_MAX
250#define __z_posix_sysconf_SC_NGROUPS_MAX _POSIX_NGROUPS_MAX
251#define __z_posix_sysconf_SC_MQ_OPEN_MAX MQ_OPEN_MAX
252#define __z_posix_sysconf_SC_MQ_PRIO_MAX MQ_PRIO_MAX
253#define __z_posix_sysconf_SC_OPEN_MAX CONFIG_POSIX_MAX_FDS
254#define __z_posix_sysconf_SC_PAGE_SIZE PAGE_SIZE
255#define __z_posix_sysconf_SC_PAGESIZE PAGESIZE
256#define __z_posix_sysconf_SC_THREAD_DESTRUCTOR_ITERATIONS PTHREAD_DESTRUCTOR_ITERATIONS
257#define __z_posix_sysconf_SC_THREAD_KEYS_MAX PTHREAD_KEYS_MAX
258#define __z_posix_sysconf_SC_THREAD_STACK_MIN PTHREAD_STACK_MIN
259#define __z_posix_sysconf_SC_THREAD_THREADS_MAX PTHREAD_THREADS_MAX
260#define __z_posix_sysconf_SC_RTSIG_MAX RTSIG_MAX
261#define __z_posix_sysconf_SC_SEM_NSEMS_MAX SEM_NSEMS_MAX
262#define __z_posix_sysconf_SC_SEM_VALUE_MAX SEM_VALUE_MAX
263#define __z_posix_sysconf_SC_SIGQUEUE_MAX SIGQUEUE_MAX
264#define __z_posix_sysconf_SC_STREAM_MAX STREAM_MAX
265#define __z_posix_sysconf_SC_SYMLOOP_MAX SYMLOOP_MAX
266#define __z_posix_sysconf_SC_TIMER_MAX TIMER_MAX
267#define __z_posix_sysconf_SC_TTY_NAME_MAX TTY_NAME_MAX
268#define __z_posix_sysconf_SC_TZNAME_MAX TZNAME_MAX
269
270#define sysconf(x) (long)CONCAT(__z_posix_sysconf, x)
271#endif
272
273#endif
274
275#ifdef __cplusplus
276}
277#endif
278
279#endif /* ZEPHYR_INCLUDE_POSIX_SYS_SYSCONF_H_ */