Skip to main content

relibc/header/unistd/sysconf/
constants.rs

1// This file holds the sysconf constants with the same values
2// across both linux and redox.
3// TODO: add more as redox starts to support them.
4
5use crate::platform::types::c_int;
6
7// POSIX.1 {
8pub const _SC_ARG_MAX: c_int = 0;
9pub const _SC_CHILD_MAX: c_int = 1;
10pub const _SC_CLK_TCK: c_int = 2;
11pub const _SC_NGROUPS_MAX: c_int = 3;
12pub const _SC_OPEN_MAX: c_int = 4;
13pub const _SC_STREAM_MAX: c_int = 5;
14pub const _SC_TZNAME_MAX: c_int = 6;
15// ...
16pub const _SC_REALTIME_SIGNALS: c_int = 9; // was 191 on redox
17// ...
18pub const _SC_TIMERS: c_int = 11;
19// ...
20pub const _SC_SEMAPHORES: c_int = 21;
21pub const _SC_SHARED_MEMORY_OBJECTS: c_int = 22;
22// ...
23pub const _SC_VERSION: c_int = 29;
24pub const _SC_PAGESIZE: c_int = 30;
25pub const _SC_PAGE_SIZE: c_int = 30;
26// ...
27pub const _SC_SIGQUEUE_MAX: c_int = 34; // was 190 on redox
28// ...
29pub const _SC_RE_DUP_MAX: c_int = 44;
30// ...
31pub const _SC_THREADS: c_int = 67;
32pub const _SC_GETGR_R_SIZE_MAX: c_int = 69;
33pub const _SC_GETPW_R_SIZE_MAX: c_int = 70;
34pub const _SC_LOGIN_NAME_MAX: c_int = 71;
35pub const _SC_TTY_NAME_MAX: c_int = 72;
36// ...
37pub const _SC_THREAD_ATTR_STACKADDR: c_int = 77;
38pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 78;
39// ...
40pub const _SC_NPROCESSORS_CONF: c_int = 83; // was 57 on redox
41pub const _SC_NPROCESSORS_ONLN: c_int = 84; // was 58 on redox
42pub const _SC_PHYS_PAGES: c_int = 85; // was 59 on redox
43pub const _SC_AVPHYS_PAGES: c_int = 86; // was 60 on redox
44// ...
45pub const _SC_BARRIERS: c_int = 133;
46// ...
47pub const _SC_MONOTONIC_CLOCK: c_int = 149;
48// ...
49pub const _SC_SHELL: c_int = 157;
50// ...
51pub const _SC_TIMEOUTS: c_int = 164;
52// ...
53pub const _SC_SYMLOOP_MAX: c_int = 173;
54// ...
55pub const _SC_HOST_NAME_MAX: c_int = 180;
56// ...
57// } POSIX.1