Merge branch 'unify-sysconf-constants' into 'master'

unify the remaining sysconf constants

See merge request redox-os/relibc!1447
This commit is contained in:
Jeremy Soller
2026-06-10 05:51:14 -06:00
3 changed files with 9 additions and 14 deletions
+9
View File
@@ -13,6 +13,8 @@ pub const _SC_OPEN_MAX: c_int = 4;
pub const _SC_STREAM_MAX: c_int = 5;
pub const _SC_TZNAME_MAX: c_int = 6;
// ...
pub const _SC_REALTIME_SIGNALS: c_int = 9; // was 191 on redox
// ...
pub const _SC_TIMERS: c_int = 11;
// ...
pub const _SC_SEMAPHORES: c_int = 21;
@@ -22,6 +24,8 @@ pub const _SC_VERSION: c_int = 29;
pub const _SC_PAGESIZE: c_int = 30;
pub const _SC_PAGE_SIZE: c_int = 30;
// ...
pub const _SC_SIGQUEUE_MAX: c_int = 34; // was 190 on redox
// ...
pub const _SC_RE_DUP_MAX: c_int = 44;
// ...
pub const _SC_THREADS: c_int = 67;
@@ -33,6 +37,11 @@ pub const _SC_TTY_NAME_MAX: c_int = 72;
pub const _SC_THREAD_ATTR_STACKADDR: c_int = 77;
pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 78;
// ...
pub const _SC_NPROCESSORS_CONF: c_int = 83; // was 57 on redox
pub const _SC_NPROCESSORS_ONLN: c_int = 84; // was 58 on redox
pub const _SC_PHYS_PAGES: c_int = 85; // was 59 on redox
pub const _SC_AVPHYS_PAGES: c_int = 86; // was 60 on redox
// ...
pub const _SC_BARRIERS: c_int = 133;
// ...
pub const _SC_MONOTONIC_CLOCK: c_int = 149;
-6
View File
@@ -16,7 +16,6 @@ pub const _XOPEN_PATH_MAX: c_long = 1024;
pub const _SC_JOB_CONTROL: c_int = 7;
pub const _SC_SAVED_IDS: c_int = 8;
pub const _SC_REALTIME_SIGNALS: c_int = 9; // 191 on redox
pub const _SC_PRIORITY_SCHEDULING: c_int = 10;
pub const _SC_ASYNCHRONOUS_IO: c_int = 12;
pub const _SC_PRIORITIZED_IO: c_int = 13;
@@ -36,7 +35,6 @@ pub const _SC_MQ_PRIO_MAX: c_int = 28;
pub const _SC_RTSIG_MAX: c_int = 31;
pub const _SC_SEM_NSEMS_MAX: c_int = 32;
pub const _SC_SEM_VALUE_MAX: c_int = 33;
pub const _SC_SIGQUEUE_MAX: c_int = 34; // 190 on redox
pub const _SC_TIMER_MAX: c_int = 35;
pub const _SC_BC_BASE_MAX: c_int = 36;
pub const _SC_BC_DIM_MAX: c_int = 37;
@@ -63,10 +61,6 @@ pub const _SC_THREAD_PRIORITY_SCHEDULING: c_int = 79;
pub const _SC_THREAD_PRIO_INHERIT: c_int = 80;
pub const _SC_THREAD_PRIO_PROTECT: c_int = 81;
pub const _SC_THREAD_PROCESS_SHARED: c_int = 82;
pub const _SC_NPROCESSORS_CONF: c_int = 83; // 57 on redox
pub const _SC_NPROCESSORS_ONLN: c_int = 84; // 58 on redox
pub const _SC_PHYS_PAGES: c_int = 85; // 59 on redox
pub const _SC_AVPHYS_PAGES: c_int = 86; // 60 on redox
pub const _SC_ATEXIT_MAX: c_int = 87;
pub const _SC_PASS_MAX: c_int = 88;
pub const _SC_XOPEN_VERSION: c_int = 89;
-8
View File
@@ -12,14 +12,6 @@ use crate::{
},
};
// TODO why are these numbered differently to linux?
pub const _SC_NPROCESSORS_CONF: c_int = 57;
pub const _SC_NPROCESSORS_ONLN: c_int = 58;
pub const _SC_PHYS_PAGES: c_int = 59;
pub const _SC_AVPHYS_PAGES: c_int = 60;
pub const _SC_SIGQUEUE_MAX: c_int = 190;
pub const _SC_REALTIME_SIGNALS: c_int = 191;
pub(super) fn sysconf_impl(name: c_int) -> c_long {
//TODO: Real values
match name {