From 11a02b035b464ab6813676adfd19c4a59c36d907 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 6 Sep 2021 12:22:54 -0300 Subject: misc: Add __get_nprocs_sched This is an internal function meant to return the number of avaliable processor where the process can scheduled, different than the __get_nprocs which returns a the system available online CPU. The Linux implementation currently only calls __get_nprocs(), which in tuns calls sched_getaffinity. Reviewed-by: Florian Weimer --- misc/getsysstats.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'misc') diff --git a/misc/getsysstats.c b/misc/getsysstats.c index 2986d62..5cbba0f 100644 --- a/misc/getsysstats.c +++ b/misc/getsysstats.c @@ -44,6 +44,12 @@ weak_alias (__get_nprocs, get_nprocs) link_warning (get_nprocs, "warning: get_nprocs will always return 1") +int +__get_nprocs_sched (void) +{ + return 1; +} + long int __get_phys_pages (void) { -- cgit v1.1