7#ifndef ZEPHYR_INCLUDE_POSIX_SYS_SYSCONF_H_
8#define ZEPHYR_INCLUDE_POSIX_SYS_SYSCONF_H_
28 _SC_MEMORY_PROTECTION,
32 _SC_PRIORITY_SCHEDULING,
35 _SC_READER_WRITER_LOCKS,
40 _SC_SHARED_MEMORY_OBJECTS,
47 _SC_THREAD_ATTR_STACKADDR,
48 _SC_THREAD_ATTR_STACKSIZE,
50 _SC_THREAD_PRIO_INHERIT,
51 _SC_THREAD_PRIO_PROTECT,
52 _SC_THREAD_PRIORITY_SCHEDULING,
53 _SC_THREAD_PROCESS_SHARED,
54 _SC_THREAD_ROBUST_PRIO_INHERIT,
55 _SC_THREAD_ROBUST_PRIO_PROTECT,
56 _SC_THREAD_SAFE_FUNCTIONS,
57 _SC_THREAD_SPORADIC_SERVER,
62 _SC_TRACE_EVENT_FILTER,
63 _SC_TRACE_EVENT_NAME_MAX,
68 _SC_TRACE_USER_EVENT_MAX,
69 _SC_TYPED_MEMORY_OBJECTS,
105 _SC_XOPEN_REALTIME_THREADS,
112 _SC_GETGR_R_SIZE_MAX,
113 _SC_GETPW_R_SIZE_MAX,
116 _SC_AIO_PRIO_DELTA_MAX,
129 _SC_THREAD_DESTRUCTOR_ITERATIONS,
131 _SC_THREAD_STACK_MIN,
132 _SC_THREAD_THREADS_MAX,
144#define __z_posix_sysconf_SC_ADVISORY_INFO (-1L)
145#define __z_posix_sysconf_SC_ASYNCHRONOUS_IO \
146 COND_CODE_1(CONFIG_POSIX_ASYNCHRONOUS_IO, (_POSIX_ASYNCHRONOUS_IO), (-1L))
147#define __z_posix_sysconf_SC_BARRIERS COND_CODE_1(CONFIG_POSIX_BARRIERS, (_POSIX_BARRIERS), (-1L))
148#define __z_posix_sysconf_SC_CLOCK_SELECTION \
149 COND_CODE_1(CONFIG_POSIX_CLOCK_SELECTION, (_POSIX_CLOCK_SELECTION), (-1L))
150#define __z_posix_sysconf_SC_CPUTIME \
151 COND_CODE_1(CONFIG_POSIX_CPUTIME, (_POSIX_CPUTIME), (-1L))
152#define __z_posix_sysconf_SC_FSYNC \
153 COND_CODE_1(CONFIG_POSIX_FSYNC, (_POSIX_FSYNC), (-1L))
154#define __z_posix_sysconf_SC_IPV6 COND_CODE_1(CONFIG_NET_IPV6, (_POSIX_IPV6), (-1L))
155#define __z_posix_sysconf_SC_JOB_CONTROL (-1L)
156#define __z_posix_sysconf_SC_MAPPED_FILES \
157 COND_CODE_1(CONFIG_POSIX_MAPPED_FILES, (_POSIX_MAPPED_FILES), (-1L))
158#define __z_posix_sysconf_SC_MEMLOCK \
159 COND_CODE_1(CONFIG_POSIX_MEMLOCK, (_POSIX_MEMLOCK), (-1L))
160#define __z_posix_sysconf_SC_MEMLOCK_RANGE \
161 COND_CODE_1(CONFIG_POSIX_MEMLOCK_RANGE, (_POSIX_MEMLOCK_RANGE), (-1L))
162#define __z_posix_sysconf_SC_MEMORY_PROTECTION \
163 COND_CODE_1(CONFIG_POSIX_MEMORY_PROTECTION, (_POSIX_MEMORY_PROTECTION), (-1L))
164#define __z_posix_sysconf_SC_MESSAGE_PASSING \
165 COND_CODE_1(CONFIG_POSIX_MESSAGE_PASSING, (_POSIX_MESSAGE_PASSING), (-1L))
166#define __z_posix_sysconf_SC_MONOTONIC_CLOCK \
167 COND_CODE_1(CONFIG_POSIX_MONOTONIC_CLOCK, (_POSIX_MONOTONIC_CLOCK), (-1L))
168#define __z_posix_sysconf_SC_PRIORITIZED_IO (-1L)
169#define __z_posix_sysconf_SC_PRIORITY_SCHEDULING \
170 COND_CODE_1(CONFIG_POSIX_PRIORITY_SCHEDULING, (_POSIX_PRIORITY_SCHEDULING), (-1L))
171#define __z_posix_sysconf_SC_RAW_SOCKETS \
172 COND_CODE_1(CONFIG_NET_SOCKETS_PACKET, (_POSIX_RAW_SOCKETS), (-1L))
173#define __z_posix_sysconf_SC_RE_DUP_MAX _POSIX_RE_DUP_MAX
174#define __z_posix_sysconf_SC_READER_WRITER_LOCKS \
175 COND_CODE_1(CONFIG_POSIX_READER_WRITER_LOCKS, (_POSIX_READER_WRITER_LOCKS), (-1L))
176#define __z_posix_sysconf_SC_REALTIME_SIGNALS (-1L)
177#define __z_posix_sysconf_SC_REGEXP (-1L)
178#define __z_posix_sysconf_SC_SAVED_IDS (-1L)
179#define __z_posix_sysconf_SC_SEMAPHORES \
180 COND_CODE_1(CONFIG_POSIX_SEMAPHORES, (_POSIX_SEMAPHORES), (-1L))
181#define __z_posix_sysconf_SC_SHARED_MEMORY_OBJECTS \
182 COND_CODE_1(CONFIG_POSIX_SHARED_MEMORY_OBJECTS, (_POSIX_SHARED_MEMORY_OBJECTS), (-1L))
183#define __z_posix_sysconf_SC_SHELL (-1L)
184#define __z_posix_sysconf_SC_SPAWN (-1L)
185#define __z_posix_sysconf_SC_SPIN_LOCKS \
186 COND_CODE_1(CONFIG_POSIX_SPIN_LOCKS, (_POSIX_SPIN_LOCKS), (-1L))
187#define __z_posix_sysconf_SC_SPORADIC_SERVER (-1L)
188#define __z_posix_sysconf_SC_SS_REPL_MAX _POSIX_SS_REPL_MAX
189#define __z_posix_sysconf_SC_SYNCHRONIZED_IO (-1L)
190#define __z_posix_sysconf_SC_THREAD_ATTR_STACKADDR \
191 COND_CODE_1(CONFIG_POSIX_THREAD_ATTR_STACKADDR, (_POSIX_THREAD_ATTR_STACKADDR), (-1))
192#define __z_posix_sysconf_SC_THREAD_ATTR_STACKSIZE \
193 COND_CODE_1(CONFIG_POSIX_THREAD_ATTR_STACKSIZE, (_POSIX_THREAD_ATTR_STACKSIZE), (-1L))
194#define __z_posix_sysconf_SC_THREAD_CPUTIME (-1L)
195#define __z_posix_sysconf_SC_THREAD_PRIO_INHERIT \
196 COND_CODE_1(CONFIG_POSIX_THREAD_PRIO_INHERIT, (_POSIX_THREAD_PRIO_INHERIT), (-1L))
197#define __z_posix_sysconf_SC_THREAD_PRIO_PROTECT (-1L)
198#define __z_posix_sysconf_SC_THREAD_PRIORITY_SCHEDULING \
199 COND_CODE_1(CONFIG_POSIX_THREAD_PRIORITY_SCHEDULING, (_POSIX_THREAD_PRIORITY_SCHEDULING), \
201#define __z_posix_sysconf_SC_THREAD_PROCESS_SHARED (-1L)
202#define __z_posix_sysconf_SC_THREAD_ROBUST_PRIO_INHERIT (-1L)
203#define __z_posix_sysconf_SC_THREAD_ROBUST_PRIO_PROTECT (-1L)
204#define __z_posix_sysconf_SC_THREAD_SAFE_FUNCTIONS \
205 COND_CODE_1(CONFIG_POSIX_THREAD_SAFE_FUNCTIONS, (_POSIX_THREAD_SAFE_FUNCTIONS), (-1L))
206#define __z_posix_sysconf_SC_THREAD_SPORADIC_SERVER (-1L)
207#define __z_posix_sysconf_SC_THREADS \
208 COND_CODE_1(CONFIG_POSIX_THREADS, (_POSIX_THREADS), (-1L))
209#define __z_posix_sysconf_SC_TIMEOUTS \
210 COND_CODE_1(CONFIG_POSIX_TIMEOUTS, (_POSIX_TIMEOUTS), (-1L))
211#define __z_posix_sysconf_SC_TIMERS \
212 COND_CODE_1(CONFIG_POSIX_TIMEOUTS, (_POSIX_TIMERS), (-1))
213#define __z_posix_sysconf_SC_TRACE (-1L)
214#define __z_posix_sysconf_SC_TRACE_EVENT_FILTER (-1L)
215#define __z_posix_sysconf_SC_TRACE_EVENT_NAME_MAX _POSIX_TRACE_NAME_MAX
216#define __z_posix_sysconf_SC_TRACE_INHERIT (-1L)
217#define __z_posix_sysconf_SC_TRACE_LOG (-1L)
218#define __z_posix_sysconf_SC_TRACE_NAME_MAX _POSIX_TRACE_NAME_MAX
219#define __z_posix_sysconf_SC_TRACE_SYS_MAX _POSIX_TRACE_SYS_MAX
220#define __z_posix_sysconf_SC_TRACE_USER_EVENT_MAX _POSIX_TRACE_USER_EVENT_MAX
221#define __z_posix_sysconf_SC_TYPED_MEMORY_OBJECTS (-1L)
222#define __z_posix_sysconf_SC_VERSION _POSIX_VERSION
223#define __z_posix_sysconf_SC_V6_ILP32_OFF32 (-1L)
224#define __z_posix_sysconf_SC_V6_ILP32_OFFBIG (-1L)
225#define __z_posix_sysconf_SC_V6_LP64_OFF64 (-1L)
226#define __z_posix_sysconf_SC_V6_LPBIG_OFFBIG (-1L)
227#define __z_posix_sysconf_SC_V7_ILP32_OFF32 (-1L)
228#define __z_posix_sysconf_SC_V7_ILP32_OFFBIG (-1L)
229#define __z_posix_sysconf_SC_V7_LP64_OFF64 (-1L)
230#define __z_posix_sysconf_SC_V7_LPBIG_OFFBIG (-1L)
231#define __z_posix_sysconf_SC_BC_BASE_MAX _POSIX2_BC_BASE_MAX
232#define __z_posix_sysconf_SC_BC_DIM_MAX _POSIX2_BC_DIM_MAX
233#define __z_posix_sysconf_SC_BC_SCALE_MAX _POSIX2_BC_SCALE_MAX
234#define __z_posix_sysconf_SC_BC_STRING_MAX _POSIX2_BC_STRING_MAX
235#define __z_posix_sysconf_SC_2_C_BIND _POSIX2_C_BIND
236#define __z_posix_sysconf_SC_2_C_DEV _POSIX2_C_DEV
237#define __z_posix_sysconf_SC_2_CHAR_TERM (-1L)
238#define __z_posix_sysconf_SC_COLL_WEIGHTS_MAX _POSIX2_COLL_WEIGHTS_MAX
239#define __z_posix_sysconf_SC_DELAYTIMER_MAX _POSIX_DELAYTIMER_MAX
240#define __z_posix_sysconf_SC_EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX
241#define __z_posix_sysconf_SC_2_FORT_DEV (-1L)
242#define __z_posix_sysconf_SC_2_FORT_RUN (-1L)
243#define __z_posix_sysconf_SC_LINE_MAX (-1L)
244#define __z_posix_sysconf_SC_2_LOCALEDEF (-1L)
245#define __z_posix_sysconf_SC_2_PBS (-1L)
246#define __z_posix_sysconf_SC_2_PBS_ACCOUNTING (-1L)
247#define __z_posix_sysconf_SC_2_PBS_CHECKPOINT (-1L)
248#define __z_posix_sysconf_SC_2_PBS_LOCATE (-1L)
249#define __z_posix_sysconf_SC_2_PBS_MESSAGE (-1L)
250#define __z_posix_sysconf_SC_2_PBS_TRACK (-1L)
251#define __z_posix_sysconf_SC_2_SW_DEV (-1L)
252#define __z_posix_sysconf_SC_2_UPE (-1L)
253#define __z_posix_sysconf_SC_2_VERSION _POSIX2_VERSION
254#define __z_posix_sysconf_SC_XOPEN_CRYPT (-1L)
255#define __z_posix_sysconf_SC_XOPEN_ENH_I18N (-1L)
256#define __z_posix_sysconf_SC_XOPEN_REALTIME (-1L)
257#define __z_posix_sysconf_SC_XOPEN_REALTIME_THREADS (-1L)
258#define __z_posix_sysconf_SC_XOPEN_SHM (-1L)
259#define __z_posix_sysconf_SC_XOPEN_STREAMS \
260 COND_CODE_1(CONFIG_XOPEN_STREAMS, (_XOPEN_STREAMS), (-1))
261#define __z_posix_sysconf_SC_XOPEN_UNIX (-1L)
262#define __z_posix_sysconf_SC_XOPEN_UUCP (-1L)
263#define __z_posix_sysconf_SC_XOPEN_VERSION _XOPEN_VERSION
264#define __z_posix_sysconf_SC_CLK_TCK (100L)
265#define __z_posix_sysconf_SC_GETGR_R_SIZE_MAX (0L)
266#define __z_posix_sysconf_SC_GETPW_R_SIZE_MAX (0L)
267#define __z_posix_sysconf_SC_AIO_LISTIO_MAX AIO_LISTIO_MAX
268#define __z_posix_sysconf_SC_AIO_MAX AIO_MAX
269#define __z_posix_sysconf_SC_AIO_PRIO_DELTA_MAX AIO_PRIO_DELTA_MAX
270#define __z_posix_sysconf_SC_ARG_MAX ARG_MAX
271#define __z_posix_sysconf_SC_ATEXIT_MAX ATEXIT_MAX
272#define __z_posix_sysconf_SC_CHILD_MAX CHILD_MAX
273#define __z_posix_sysconf_SC_HOST_NAME_MAX HOST_NAME_MAX
274#define __z_posix_sysconf_SC_IOV_MAX IOV_MAX
275#define __z_posix_sysconf_SC_LOGIN_NAME_MAX LOGIN_NAME_MAX
276#define __z_posix_sysconf_SC_NGROUPS_MAX _POSIX_NGROUPS_MAX
277#define __z_posix_sysconf_SC_MQ_OPEN_MAX MQ_OPEN_MAX
278#define __z_posix_sysconf_SC_MQ_PRIO_MAX MQ_PRIO_MAX
279#define __z_posix_sysconf_SC_OPEN_MAX CONFIG_ZVFS_OPEN_MAX
280#define __z_posix_sysconf_SC_PAGE_SIZE PAGE_SIZE
281#define __z_posix_sysconf_SC_PAGESIZE PAGESIZE
282#define __z_posix_sysconf_SC_THREAD_DESTRUCTOR_ITERATIONS PTHREAD_DESTRUCTOR_ITERATIONS
283#define __z_posix_sysconf_SC_THREAD_KEYS_MAX PTHREAD_KEYS_MAX
284#define __z_posix_sysconf_SC_THREAD_STACK_MIN PTHREAD_STACK_MIN
285#define __z_posix_sysconf_SC_THREAD_THREADS_MAX PTHREAD_THREADS_MAX
286#define __z_posix_sysconf_SC_RTSIG_MAX RTSIG_MAX
287#define __z_posix_sysconf_SC_SEM_NSEMS_MAX SEM_NSEMS_MAX
288#define __z_posix_sysconf_SC_SEM_VALUE_MAX SEM_VALUE_MAX
289#define __z_posix_sysconf_SC_SIGQUEUE_MAX SIGQUEUE_MAX
290#define __z_posix_sysconf_SC_STREAM_MAX STREAM_MAX
291#define __z_posix_sysconf_SC_SYMLOOP_MAX SYMLOOP_MAX
292#define __z_posix_sysconf_SC_TIMER_MAX TIMER_MAX
293#define __z_posix_sysconf_SC_TTY_NAME_MAX TTY_NAME_MAX
294#define __z_posix_sysconf_SC_TZNAME_MAX TZNAME_MAX
296#ifdef CONFIG_POSIX_SYSCONF_IMPL_MACRO
297#define sysconf(x) (long)CONCAT(__z_posix_sysconf, x)