summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2022-08-26 10:20:46 -0400
committerRich Felker <dalias@aerifal.cx>2022-08-26 10:20:46 -0400
commit25340a93375fc6d3324ab65c154edbf8d1701801 (patch)
treee1f93eb27e55276222bdaa7141314c86841bc8e2 /src
parentd8fddb964108e57e670d20c36e6da84796617d78 (diff)
downloadmusl-25340a93375fc6d3324ab65c154edbf8d1701801.tar.gz
add sysconf keys/values for signal stack size
as a result of ISA extensions exploding register file sizes on some archs, using a constant for minimum signal stack size no longer seems viably future-proof. add sysconf keys allowing the kernel to provide a machine-dependent minimum applications can query to ensure they allocate sufficient space for stacks. the key names and indices align with the same functionality in glibc. see commit d5a5045382315e36588ca225889baa36ed0ed38f for previous action on this subject. ultimately, the macros MINSIGSTKSZ and SIGSTKSZ probably need to be deprecated, but that is standards-amendment work outside the scope of a single implementation.
Diffstat (limited to 'src')
-rw-r--r--src/conf/sysconf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/conf/sysconf.c b/src/conf/sysconf.c
index 3baaed32..33220daf 100644
--- a/src/conf/sysconf.c
+++ b/src/conf/sysconf.c
@@ -165,6 +165,9 @@ long sysconf(int name)
[_SC_XOPEN_STREAMS] = JT_ZERO,
[_SC_THREAD_ROBUST_PRIO_INHERIT] = -1,
[_SC_THREAD_ROBUST_PRIO_PROTECT] = -1,
+
+ [_SC_MINSIGSTKSZ] = MINSIGSTKSZ,
+ [_SC_SIGSTKSZ] = SIGSTKSZ,
};
if (name >= sizeof(values)/sizeof(values[0]) || !values[name]) {