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_PAGESIZE            0x0027
77 #define _SC_PAGE_SIZE           0x0028
78 #define _SC_XOPEN_UNIX          0x0029
79 #define _SC_XBS5_ILP32_OFF32    0x002a  /* Obsolescent in POSIX.1-2008, TODO: remove it. */
80 #define _SC_XBS5_ILP32_OFFBIG   0x002b  /* Obsolescent in POSIX.1-2008, TODO: remove it. */
81 #define _SC_XBS5_LP64_OFF64     0x002c  /* Obsolescent in POSIX.1-2008, TODO: remove it. */
82 #define _SC_XBS5_LPBIG_OFFBIG   0x002d  /* Obsolescent in POSIX.1-2008, TODO: remove it. */
83 #define _SC_AIO_LISTIO_MAX      0x002e
84 #define _SC_AIO_MAX             0x002f
85 #define _SC_AIO_PRIO_DELTA_MAX  0x0030
86 #define _SC_DELAYTIMER_MAX      0x0031
87 #define _SC_MQ_OPEN_MAX         0x0032
88 #define _SC_MQ_PRIO_MAX         0x0033
89 #define _SC_RTSIG_MAX           0x0034
90 #define _SC_SEM_NSEMS_MAX       0x0035
91 #define _SC_SEM_VALUE_MAX       0x0036
92 #define _SC_SIGQUEUE_MAX        0x0037
93 #define _SC_TIMER_MAX           0x0038
94 #define _SC_ASYNCHRONOUS_IO     0x0039
95 #define _SC_FSYNC               0x003a
96 #define _SC_MAPPED_FILES        0x003b
97 #define _SC_MEMLOCK             0x003c
98 #define _SC_MEMLOCK_RANGE       0x003d
99 #define _SC_MEMORY_PROTECTION   0x003e
100 #define _SC_MESSAGE_PASSING     0x003f
101 #define _SC_PRIORITIZED_IO      0x0040
102 #define _SC_PRIORITY_SCHEDULING 0x0041
103 #define _SC_REALTIME_SIGNALS    0x0042
104 #define _SC_SEMAPHORES          0x0043
105 #define _SC_SHARED_MEMORY_OBJECTS  0x0044
106 #define _SC_SYNCHRONIZED_IO     0x0045
107 #define _SC_TIMERS              0x0046
108 #define _SC_GETGR_R_SIZE_MAX    0x0047
109 #define _SC_GETPW_R_SIZE_MAX    0x0048
110 #define _SC_LOGIN_NAME_MAX      0x0049
111 #define _SC_THREAD_DESTRUCTOR_ITERATIONS  0x004a
112 #define _SC_THREAD_KEYS_MAX     0x004b
113 #define _SC_THREAD_STACK_MIN    0x004c
114 #define _SC_THREAD_THREADS_MAX  0x004d
115 #define _SC_TTY_NAME_MAX        0x004e
116 
117 #define _SC_THREADS                     0x004f
118 #define _SC_THREAD_ATTR_STACKADDR       0x0050
119 #define _SC_THREAD_ATTR_STACKSIZE       0x0051
120 #define _SC_THREAD_PRIORITY_SCHEDULING  0x0052
121 #define _SC_THREAD_PRIO_INHERIT         0x0053
122 #define _SC_THREAD_PRIO_PROTECT         0x0054
123 #define _SC_THREAD_SAFE_FUNCTIONS       0x0055
124 
125 #define _SC_NPROCESSORS_CONF            0x0060
126 #define _SC_NPROCESSORS_ONLN            0x0061
127 #define _SC_PHYS_PAGES                  0x0062
128 #define _SC_AVPHYS_PAGES                0x0063
129 #define _SC_MONOTONIC_CLOCK             0x0064
130 
131 #define _SC_2_PBS               0x0065
132 #define _SC_2_PBS_ACCOUNTING    0x0066
133 #define _SC_2_PBS_CHECKPOINT    0x0067
134 #define _SC_2_PBS_LOCATE        0x0068
135 #define _SC_2_PBS_MESSAGE       0x0069
136 #define _SC_2_PBS_TRACK         0x006a
137 #define _SC_ADVISORY_INFO       0x006b
138 #define _SC_BARRIERS            0x006c
139 #define _SC_CLOCK_SELECTION     0x006d
140 #define _SC_CPUTIME             0x006e
141 #define _SC_HOST_NAME_MAX       0x006f
142 #define _SC_IPV6                0x0070
143 #define _SC_RAW_SOCKETS         0x0071
144 #define _SC_READER_WRITER_LOCKS 0x0072
145 #define _SC_REGEXP              0x0073
146 #define _SC_SHELL               0x0074
147 #define _SC_SPAWN               0x0075
148 #define _SC_SPIN_LOCKS          0x0076
149 #define _SC_SPORADIC_SERVER     0x0077
150 #define _SC_SS_REPL_MAX         0x0078
151 #define _SC_SYMLOOP_MAX         0x0079
152 #define _SC_THREAD_CPUTIME      0x007a
153 #define _SC_THREAD_PROCESS_SHARED       0x007b
154 #define _SC_THREAD_ROBUST_PRIO_INHERIT  0x007c
155 #define _SC_THREAD_ROBUST_PRIO_PROTECT  0x007d
156 #define _SC_THREAD_SPORADIC_SERVER      0x007e
157 #define _SC_TIMEOUTS            0x007f
158 #define _SC_TRACE               0x0080
159 #define _SC_TRACE_EVENT_FILTER  0x0081
160 #define _SC_TRACE_EVENT_NAME_MAX  0x0082
161 #define _SC_TRACE_INHERIT       0x0083
162 #define _SC_TRACE_LOG           0x0084
163 #define _SC_TRACE_NAME_MAX      0x0085
164 #define _SC_TRACE_SYS_MAX       0x0086
165 #define _SC_TRACE_USER_EVENT_MAX  0x0087
166 #define _SC_TYPED_MEMORY_OBJECTS  0x0088
167 #define _SC_V7_ILP32_OFF32      0x0089
168 #define _SC_V7_ILP32_OFFBIG     0x008a
169 #define _SC_V7_LP64_OFF64       0x008b
170 #define _SC_V7_LPBIG_OFFBIG     0x008c
171 #define _SC_XOPEN_STREAMS       0x008d
172 #define _SC_XOPEN_UUCP          0x008e
173 
174 #define _SC_LEVEL1_ICACHE_SIZE      0x008f
175 #define _SC_LEVEL1_ICACHE_ASSOC     0x0090
176 #define _SC_LEVEL1_ICACHE_LINESIZE  0x0091
177 #define _SC_LEVEL1_DCACHE_SIZE      0x0092
178 #define _SC_LEVEL1_DCACHE_ASSOC     0x0093
179 #define _SC_LEVEL1_DCACHE_LINESIZE  0x0094
180 #define _SC_LEVEL2_CACHE_SIZE       0x0095
181 #define _SC_LEVEL2_CACHE_ASSOC      0x0096
182 #define _SC_LEVEL2_CACHE_LINESIZE   0x0097
183 #define _SC_LEVEL3_CACHE_SIZE       0x0098
184 #define _SC_LEVEL3_CACHE_ASSOC      0x0099
185 #define _SC_LEVEL3_CACHE_LINESIZE   0x009a
186 #define _SC_LEVEL4_CACHE_SIZE       0x009b
187 #define _SC_LEVEL4_CACHE_ASSOC      0x009c
188 #define _SC_LEVEL4_CACHE_LINESIZE   0x009d
189 
190 __BEGIN_DECLS
191 
192 long sysconf(int __name);
193 
194 __END_DECLS
195 
196 #endif /* _SYS_SYSCONF_H_ */
197