diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-03-04 22:10:01 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-03-04 22:10:01 -0500 |
commit | 2b42c8cb37a3ef115bd04de8637078e43cd72f37 (patch) | |
tree | 7780a53c16d937fec266792f2dbc7c4f2ff7599a /src/conf | |
parent | 380857bf21bcffbbee2fe8ab52feadf39366d7ec (diff) | |
download | musl-2b42c8cb37a3ef115bd04de8637078e43cd72f37.tar.gz musl-2b42c8cb37a3ef115bd04de8637078e43cd72f37.tar.bz2 musl-2b42c8cb37a3ef115bd04de8637078e43cd72f37.tar.xz musl-2b42c8cb37a3ef115bd04de8637078e43cd72f37.zip |
add legacy functions from sysinfo.h duplicating sysconf functionality
Diffstat (limited to 'src/conf')
-rw-r--r-- | src/conf/legacy.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/conf/legacy.c b/src/conf/legacy.c new file mode 100644 index 00000000..f1d9e325 --- /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); +} |