diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-03-25 09:30:07 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-05-07 13:54:09 -0300 |
commit | 903bc7dcc2acafc40be11639767e10a2de712649 (patch) | |
tree | cee8ab271ec58e80ce0b34e33ad2c3f5f1662370 /posix/sched_cpucount.c | |
parent | db373e4c57159ac82df4b07b596dd29c4cfe9d86 (diff) | |
download | glibc-903bc7dcc2acafc40be11639767e10a2de712649.zip glibc-903bc7dcc2acafc40be11639767e10a2de712649.tar.gz glibc-903bc7dcc2acafc40be11639767e10a2de712649.tar.bz2 |
linux: Use sched_getaffinity for __get_nprocs (BZ #27645)
Both the sysfs and procfs parsing (through GET_NPROCS_PARSER) are
removed in favor the syscall. The initial scratch buffer should
fit to most of the common usage (1024 bytes with maps to 8192 CPUs).
Checked on x86_64-linux-gnu and aarch64-linux-gnu.
Diffstat (limited to 'posix/sched_cpucount.c')
-rw-r--r-- | posix/sched_cpucount.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/posix/sched_cpucount.c b/posix/sched_cpucount.c index 63d0e99..95c125f 100644 --- a/posix/sched_cpucount.c +++ b/posix/sched_cpucount.c @@ -38,3 +38,4 @@ __sched_cpucount (size_t setsize, const cpu_set_t *setp) s += countbits (setp->__bits[i]); return s; } +libc_hidden_def (__sched_cpucount) |