about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-03-25 09:30:07 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-05-07 13:54:09 -0300
commit903bc7dcc2acafc40be11639767e10a2de712649 (patch)
treecee8ab271ec58e80ce0b34e33ad2c3f5f1662370 /posix
parentdb373e4c57159ac82df4b07b596dd29c4cfe9d86 (diff)
downloadglibc-903bc7dcc2acafc40be11639767e10a2de712649.tar.gz
glibc-903bc7dcc2acafc40be11639767e10a2de712649.tar.xz
glibc-903bc7dcc2acafc40be11639767e10a2de712649.zip
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')
-rw-r--r--posix/sched_cpucount.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/posix/sched_cpucount.c b/posix/sched_cpucount.c
index 63d0e99590..95c125f8a4 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)