projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
380857b
)
add legacy functions from sysinfo.h duplicating sysconf functionality
author
Rich Felker
<dalias@aerifal.cx>
Thu, 5 Mar 2015 03:10:01 +0000
(22:10 -0500)
committer
Rich Felker
<dalias@aerifal.cx>
Thu, 5 Mar 2015 03:10:01 +0000
(22:10 -0500)
src/conf/legacy.c
[new file with mode: 0644]
patch
|
blob
diff --git a/src/conf/legacy.c
b/src/conf/legacy.c
new file mode 100644
(file)
index 0000000..
f1d9e32
--- /dev/null
+++ b/
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);
+}