mirror of
https://git.musl-libc.org/git/musl
synced 2025-01-25 15:42:06 +03:00
add legacy functions from sysinfo.h duplicating sysconf functionality
This commit is contained in:
parent
380857bf21
commit
2b42c8cb37
22
src/conf/legacy.c
Normal file
22
src/conf/legacy.c
Normal file
@ -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);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user