linux: Use sched_getaffinity for __get_nprocs (BZ #27645)
commit903bc7dcc2acafc40be11639767e10a2de712649
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 25 Mar 2021 12:30:07 +0000 (25 09:30 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 7 May 2021 16:54:09 +0000 (7 13:54 -0300)
treecee8ab271ec58e80ce0b34e33ad2c3f5f1662370
parentdb373e4c57159ac82df4b07b596dd29c4cfe9d86
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.
include/bits/cpu-set.h
posix/sched_cpucount.c
sysdeps/unix/sysv/linux/alpha/getsysstats.c
sysdeps/unix/sysv/linux/getsysstats.c
sysdeps/unix/sysv/linux/m68k/getsysstats.c [deleted file]
sysdeps/unix/sysv/linux/microblaze/getsysstats.c [deleted file]
sysdeps/unix/sysv/linux/mips/getsysstats.c [deleted file]
sysdeps/unix/sysv/linux/sparc/getsysstats.c