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#ifndef _SYS_SYSCONF_H_
29#define _SYS_SYSCONF_H_
30
31#include <sys/cdefs.h>
32
33__BEGIN_DECLS
34
35/* as listed by Posix sysconf() description */
36/* most of these will return -1 and ENOSYS  */
37
38#define _SC_ARG_MAX             0x0000
39#define _SC_BC_BASE_MAX         0x0001
40#define _SC_BC_DIM_MAX          0x0002
41#define _SC_BC_SCALE_MAX        0x0003
42#define _SC_BC_STRING_MAX       0x0004
43#define _SC_CHILD_MAX           0x0005
44#define _SC_CLK_TCK             0x0006
45#define _SC_COLL_WEIGHTS_MAX    0x0007
46#define _SC_EXPR_NEST_MAX       0x0008
47#define _SC_LINE_MAX            0x0009
48#define _SC_NGROUPS_MAX         0x000a
49#define _SC_OPEN_MAX            0x000b
50#define _SC_PASS_MAX            0x000c
51#define _SC_2_C_BIND            0x000d
52#define _SC_2_C_DEV             0x000e
53#define _SC_2_C_VERSION         0x000f
54#define _SC_2_CHAR_TERM         0x0010
55#define _SC_2_FORT_DEV          0x0011
56#define _SC_2_FORT_RUN          0x0012
57#define _SC_2_LOCALEDEF         0x0013
58#define _SC_2_SW_DEV            0x0014
59#define _SC_2_UPE               0x0015
60#define _SC_2_VERSION           0x0016
61#define _SC_JOB_CONTROL         0x0017
62#define _SC_SAVED_IDS           0x0018
63#define _SC_VERSION             0x0019
64#define _SC_RE_DUP_MAX          0x001a
65#define _SC_STREAM_MAX          0x001b
66#define _SC_TZNAME_MAX          0x001c
67#define _SC_XOPEN_CRYPT         0x001d
68#define _SC_XOPEN_ENH_I18N      0x001e
69#define _SC_XOPEN_SHM           0x001f
70#define _SC_XOPEN_VERSION       0x0020
71#define _SC_XOPEN_XCU_VERSION   0x0021
72#define _SC_XOPEN_REALTIME      0x0022
73#define _SC_XOPEN_REALTIME_THREADS  0x0023
74#define _SC_XOPEN_LEGACY        0x0024
75#define _SC_ATEXIT_MAX          0x0025
76#define _SC_IOV_MAX             0x0026
77#define _SC_PAGESIZE            0x0027
78#define _SC_PAGE_SIZE           0x0028
79#define _SC_XOPEN_UNIX          0x0029
80#define _SC_XBS5_ILP32_OFF32    0x002a
81#define _SC_XBS5_ILP32_OFFBIG   0x002b
82#define _SC_XBS5_LP64_OFF64     0x002c
83#define _SC_XBS5_LPBIG_OFFBIG   0x002d
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
132extern int sysconf(int name);
133
134__END_DECLS
135
136#endif /* _SYS_SYSCONF_H_ */
137