1 /*
2  * Copyright (C) 2008 The Android Open Source Project
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *  * Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  *  * Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in
12  *    the documentation and/or other materials provided with the
13  *    distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
18  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
22  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26  * SUCH DAMAGE.
27  */
28 
29 #ifndef _BITS_SYSCONF_H_
30 #define _BITS_SYSCONF_H_
31 
32 #include <sys/cdefs.h>
33 
34 /* as listed by Posix sysconf() description */
35 /* most of these will return -1 and ENOSYS  */
36 
37 #define _SC_ARG_MAX             0x0000
38 #define _SC_BC_BASE_MAX         0x0001
39 #define _SC_BC_DIM_MAX          0x0002
40 #define _SC_BC_SCALE_MAX        0x0003
41 #define _SC_BC_STRING_MAX       0x0004
42 #define _SC_CHILD_MAX           0x0005
43 #define _SC_CLK_TCK             0x0006
44 #define _SC_COLL_WEIGHTS_MAX    0x0007
45 #define _SC_EXPR_NEST_MAX       0x0008
46 #define _SC_LINE_MAX            0x0009
47 #define _SC_NGROUPS_MAX         0x000a
48 #define _SC_OPEN_MAX            0x000b
49 #define _SC_PASS_MAX            0x000c
50 #define _SC_2_C_BIND            0x000d
51 #define _SC_2_C_DEV             0x000e
52 #define _SC_2_C_VERSION         0x000f  /* Obsolescent in POSIX.1-2008, TODO: remove it. */
53 #define _SC_2_CHAR_TERM         0x0010
54 #define _SC_2_FORT_DEV          0x0011
55 #define _SC_2_FORT_RUN          0x0012
56 #define _SC_2_LOCALEDEF         0x0013
57 #define _SC_2_SW_DEV            0x0014
58 #define _SC_2_UPE               0x0015
59 #define _SC_2_VERSION           0x0016
60 #define _SC_JOB_CONTROL         0x0017
61 #define _SC_SAVED_IDS           0x0018
62 #define _SC_VERSION             0x0019
63 #define _SC_RE_DUP_MAX          0x001a
64 #define _SC_STREAM_MAX          0x001b
65 #define _SC_TZNAME_MAX          0x001c
66 #define _SC_XOPEN_CRYPT         0x001d
67 #define _SC_XOPEN_ENH_I18N      0x001e
68 #define _SC_XOPEN_SHM           0x001f
69 #define _SC_XOPEN_VERSION       0x0020
70 #define _SC_XOPEN_XCU_VERSION   0x0021  /* Obsolescent in POSIX.1-2008, TODO: remove it. */
71 #define _SC_XOPEN_REALTIME      0x0022
72 #define _SC_XOPEN_REALTIME_THREADS  0x0023
73 #define _SC_XOPEN_LEGACY        0x0024
74 #define _SC_ATEXIT_MAX          0x0025
75 #define _SC_IOV_MAX             0x0026
76 #define _SC_UIO_MAXIOV _SC_IOV_MAX
77 #define _SC_PAGESIZE            0x0027
78 #define _SC_PAGE_SIZE           0x0028
79 #define _SC_XOPEN_UNIX          0x0029
80 #define _SC_XBS5_ILP32_OFF32    0x002a  /* Obsolescent in POSIX.1-2008, TODO: remove it. */
81 #define _SC_XBS5_ILP32_OFFBIG   0x002b  /* Obsolescent in POSIX.1-2008, TODO: remove it. */
82 #define _SC_XBS5_LP64_OFF64     0x002c  /* Obsolescent in POSIX.1-2008, TODO: remove it. */
83 #define _SC_XBS5_LPBIG_OFFBIG   0x002d  /* Obsolescent in POSIX.1-2008, TODO: remove it. */
84 #define _SC_AIO_LISTIO_MAX      0x002e
85 #define _SC_AIO_MAX             0x002f
86 #define _SC_AIO_PRIO_DELTA_MAX  0x0030
87 #define _SC_DELAYTIMER_MAX      0x0031
88 #define _SC_MQ_OPEN_MAX         0x0032
89 #define _SC_MQ_PRIO_MAX         0x0033
90 #define _SC_RTSIG_MAX           0x0034
91 #define _SC_SEM_NSEMS_MAX       0x0035
92 #define _SC_SEM_VALUE_MAX       0x0036
93 #define _SC_SIGQUEUE_MAX        0x0037
94 #define _SC_TIMER_MAX           0x0038
95 #define _SC_ASYNCHRONOUS_IO     0x0039
96 #define _SC_FSYNC               0x003a
97 #define _SC_MAPPED_FILES        0x003b
98 #define _SC_MEMLOCK             0x003c
99 #define _SC_MEMLOCK_RANGE       0x003d
100 #define _SC_MEMORY_PROTECTION   0x003e
101 #define _SC_MESSAGE_PASSING     0x003f
102 #define _SC_PRIORITIZED_IO      0x0040
103 #define _SC_PRIORITY_SCHEDULING 0x0041
104 #define _SC_REALTIME_SIGNALS    0x0042
105 #define _SC_SEMAPHORES          0x0043
106 #define _SC_SHARED_MEMORY_OBJECTS  0x0044
107 #define _SC_SYNCHRONIZED_IO     0x0045
108 #define _SC_TIMERS              0x0046
109 #define _SC_GETGR_R_SIZE_MAX    0x0047
110 #define _SC_GETPW_R_SIZE_MAX    0x0048
111 #define _SC_LOGIN_NAME_MAX      0x0049
112 #define _SC_THREAD_DESTRUCTOR_ITERATIONS  0x004a
113 #define _SC_THREAD_KEYS_MAX     0x004b
114 #define _SC_THREAD_STACK_MIN    0x004c
115 #define _SC_THREAD_THREADS_MAX  0x004d
116 #define _SC_TTY_NAME_MAX        0x004e
117 
118 #define _SC_THREADS                     0x004f
119 #define _SC_THREAD_ATTR_STACKADDR       0x0050
120 #define _SC_THREAD_ATTR_STACKSIZE       0x0051
121 #define _SC_THREAD_PRIORITY_SCHEDULING  0x0052
122 #define _SC_THREAD_PRIO_INHERIT         0x0053
123 #define _SC_THREAD_PRIO_PROTECT         0x0054
124 #define _SC_THREAD_SAFE_FUNCTIONS       0x0055
125 
126 #define _SC_NPROCESSORS_CONF            0x0060
127 #define _SC_NPROCESSORS_ONLN            0x0061
128 #define _SC_PHYS_PAGES                  0x0062
129 #define _SC_AVPHYS_PAGES                0x0063
130 #define _SC_MONOTONIC_CLOCK             0x0064
131 
132 #define _SC_2_PBS               0x0065
133 #define _SC_2_PBS_ACCOUNTING    0x0066
134 #define _SC_2_PBS_CHECKPOINT    0x0067
135 #define _SC_2_PBS_LOCATE        0x0068
136 #define _SC_2_PBS_MESSAGE       0x0069
137 #define _SC_2_PBS_TRACK         0x006a
138 #define _SC_ADVISORY_INFO       0x006b
139 #define _SC_BARRIERS            0x006c
140 #define _SC_CLOCK_SELECTION     0x006d
141 #define _SC_CPUTIME             0x006e
142 #define _SC_HOST_NAME_MAX       0x006f
143 #define _SC_IPV6                0x0070
144 #define _SC_RAW_SOCKETS         0x0071
145 #define _SC_READER_WRITER_LOCKS 0x0072
146 #define _SC_REGEXP              0x0073
147 #define _SC_SHELL               0x0074
148 #define _SC_SPAWN               0x0075
149 #define _SC_SPIN_LOCKS          0x0076
150 #define _SC_SPORADIC_SERVER     0x0077
151 #define _SC_SS_REPL_MAX         0x0078
152 #define _SC_SYMLOOP_MAX         0x0079
153 #define _SC_THREAD_CPUTIME      0x007a
154 #define _SC_THREAD_PROCESS_SHARED       0x007b
155 #define _SC_THREAD_ROBUST_PRIO_INHERIT  0x007c
156 #define _SC_THREAD_ROBUST_PRIO_PROTECT  0x007d
157 #define _SC_THREAD_SPORADIC_SERVER      0x007e
158 #define _SC_TIMEOUTS            0x007f
159 #define _SC_TRACE               0x0080
160 #define _SC_TRACE_EVENT_FILTER  0x0081
161 #define _SC_TRACE_EVENT_NAME_MAX  0x0082
162 #define _SC_TRACE_INHERIT       0x0083
163 #define _SC_TRACE_LOG           0x0084
164 #define _SC_TRACE_NAME_MAX      0x0085
165 #define _SC_TRACE_SYS_MAX       0x0086
166 #define _SC_TRACE_USER_EVENT_MAX  0x0087
167 #define _SC_TYPED_MEMORY_OBJECTS  0x0088
168 #define _SC_V7_ILP32_OFF32      0x0089
169 #define _SC_V7_ILP32_OFFBIG     0x008a
170 #define _SC_V7_LP64_OFF64       0x008b
171 #define _SC_V7_LPBIG_OFFBIG     0x008c
172 #define _SC_XOPEN_STREAMS       0x008d
173 #define _SC_XOPEN_UUCP          0x008e
174 
175 #define _SC_LEVEL1_ICACHE_SIZE      0x008f
176 #define _SC_LEVEL1_ICACHE_ASSOC     0x0090
177 #define _SC_LEVEL1_ICACHE_LINESIZE  0x0091
178 #define _SC_LEVEL1_DCACHE_SIZE      0x0092
179 #define _SC_LEVEL1_DCACHE_ASSOC     0x0093
180 #define _SC_LEVEL1_DCACHE_LINESIZE  0x0094
181 #define _SC_LEVEL2_CACHE_SIZE       0x0095
182 #define _SC_LEVEL2_CACHE_ASSOC      0x0096
183 #define _SC_LEVEL2_CACHE_LINESIZE   0x0097
184 #define _SC_LEVEL3_CACHE_SIZE       0x0098
185 #define _SC_LEVEL3_CACHE_ASSOC      0x0099
186 #define _SC_LEVEL3_CACHE_LINESIZE   0x009a
187 #define _SC_LEVEL4_CACHE_SIZE       0x009b
188 #define _SC_LEVEL4_CACHE_ASSOC      0x009c
189 #define _SC_LEVEL4_CACHE_LINESIZE   0x009d
190 
191 __BEGIN_DECLS
192 
193 long sysconf(int __name);
194 
195 __END_DECLS
196 
197 #endif /* _SYS_SYSCONF_H_ */
198