From 903bc7dcc2acafc40be11639767e10a2de712649 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 25 Mar 2021 09:30:07 -0300 Subject: 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. --- posix/sched_cpucount.c | 1 + 1 file changed, 1 insertion(+) (limited to 'posix') 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) -- cgit v1.1