summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/conf/legacy.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/conf/legacy.c')
-rw-r--r--libc-top-half/musl/src/conf/legacy.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/conf/legacy.c b/libc-top-half/musl/src/conf/legacy.c
new file mode 100644
index 0000000..f1d9e32
--- /dev/null
+++ b/libc-top-half/musl/src/conf/legacy.c
@@ -0,0 +1,22 @@
+#include <sys/sysinfo.h>
+#include <unistd.h>
+
+int get_nprocs_conf()
+{
+ return sysconf(_SC_NPROCESSORS_CONF);
+}
+
+int get_nprocs()
+{
+ return sysconf(_SC_NPROCESSORS_ONLN);
+}
+
+long get_phys_pages()
+{
+ return sysconf(_SC_PHYS_PAGES);
+}
+
+long get_avphys_pages()
+{
+ return sysconf(_SC_AVPHYS_PAGES);
+}