Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(682)

Unified Diff: fusl/src/conf/legacy.c

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fusl/src/conf/fpathconf.c ('k') | fusl/src/conf/pathconf.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/conf/legacy.c
diff --git a/fusl/src/conf/legacy.c b/fusl/src/conf/legacy.c
new file mode 100644
index 0000000000000000000000000000000000000000..f1d9e3253cf640fa30a5560d8b9913296eccb6d0
--- /dev/null
+++ b/fusl/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);
+}
« no previous file with comments | « fusl/src/conf/fpathconf.c ('k') | fusl/src/conf/pathconf.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698