diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-09-06 12:22:54 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-09-27 09:13:06 -0300 |
commit | 11a02b035b464ab6813676adfd19c4a59c36d907 (patch) | |
tree | aadaa54c5ca5608981c8a2482ec184d022a0730a /sysdeps/unix | |
parent | 514638699d4b76826096a5f47136dc58f7619944 (diff) | |
download | glibc-11a02b035b464ab6813676adfd19c4a59c36d907.tar.gz glibc-11a02b035b464ab6813676adfd19c4a59c36d907.tar.xz glibc-11a02b035b464ab6813676adfd19c4a59c36d907.zip |
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 <fweimer@redhat.com>
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/sysv/linux/getsysstats.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c index 8a5d342f0c..e9c0dc4d83 100644 --- a/sysdeps/unix/sysv/linux/getsysstats.c +++ b/sysdeps/unix/sysv/linux/getsysstats.c @@ -87,6 +87,12 @@ __get_nprocs (void) libc_hidden_def (__get_nprocs) weak_alias (__get_nprocs, get_nprocs) +int +__get_nprocs_sched (void) +{ + return __get_nprocs (); +} + /* On some architectures it is possible to distinguish between configured and active cpus. */ |