glibc/sysdeps/unix/sysv/linux/riscv
H.J. Lu a092ca9453 Add getcpu
Add

  #include <sched.h>

  int getcpu (unsigned int *cpu, unsigned int *node);

to return currently used CPU and NUMA node.

Tested on x86-64, x32 and i686 as well as with build-many-glibcs.py.

	* NEWS: Mention getcpu.
	* include/sched.h (__getcpu): New libc_hidden_proto.
	* manual/resource.texi: Document getcpu.
	* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add getcpu.
	* sysdeps/unix/sysv/linux/Versions (GLIBC_2.29): Add getcpu.
	* sysdeps/unix/sysv/linux/aarch64/libc.abilist: Add getcpu.
	* sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/arm/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/bits/sched.h (getcpu): New prototype.
	* sysdeps/unix/sysv/linux/getcpu.c: New file.
	* sysdeps/unix/sysv/linux/tst-skeleton-affinity.c (test_size):
	Also check getcpu.
2018-12-07 09:17:50 -08:00
..
bits Unify some sys/procfs.h headers. 2018-09-25 16:48:15 +00:00
rv64 Add getcpu 2018-12-07 09:17:50 -08:00
sys Unify some sys/procfs.h headers. 2018-09-25 16:48:15 +00:00
atomic-machine.h
clone.S RISC-V: Linux Syscall Interface 2018-01-29 10:27:52 -08:00
configure RISC-V: Build Infastructure 2018-01-29 10:43:15 -08:00
configure.ac RISC-V: Build Infastructure 2018-01-29 10:43:15 -08:00
dl-cache.h RISC-V: Linux ABI 2018-01-29 10:37:27 -08:00
dl-static.c RISC-V: Linux Startup and Dynamic Loading Code 2018-01-29 10:37:28 -08:00
flush-icache.c RISC-V: Linux ABI 2018-01-29 10:37:27 -08:00
getcontext.S RISC-V: Linux ABI 2018-01-29 10:37:27 -08:00
Implies RISC-V: Build Infastructure 2018-01-29 10:43:15 -08:00
init-first.c RISC-V: Linux ABI 2018-01-29 10:37:27 -08:00
ipc_priv.h RISC-V: Add ipc_priv.h 2018-01-29 10:43:15 -08:00
kernel-features.h RISC-V: don't assume PI mutexes and robust futexes before 4.20 (bug 23864) 2018-11-07 09:37:48 +01:00
ldconfig.h RISC-V: Linux Startup and Dynamic Loading Code 2018-01-29 10:37:28 -08:00
ldd-rewrite.sed RISC-V: Build Infastructure 2018-01-29 10:43:15 -08:00
ldsodefs.h RISC-V: Linux Startup and Dynamic Loading Code 2018-01-29 10:37:28 -08:00
libc-vdso.h RISC-V: Linux ABI 2018-01-29 10:37:27 -08:00
localplt.data RISC-V: Add ABI Lists 2018-01-29 10:37:28 -08:00
makecontext.c RISC-V: Linux ABI 2018-01-29 10:37:27 -08:00
Makefile RISC-V: Build Infastructure 2018-01-29 10:43:15 -08:00
profil-counter.h RISC-V: Linux Syscall Interface 2018-01-29 10:27:52 -08:00
pt-vfork.S RISC-V: Linux Syscall Interface 2018-01-29 10:27:52 -08:00
readelflib.c [RISC-V] Fix parsing flags in ELF64 files. 2018-02-09 18:51:32 -05:00
register-dump.h RISC-V: Linux ABI 2018-01-29 10:37:27 -08:00
setcontext.S Don't use PSEUDO_END for non-PSEUDO function 2018-10-23 09:41:43 +02:00
shlib-versions RISC-V: Build Infastructure 2018-01-29 10:43:15 -08:00
sigcontextinfo.h Remove unused frame.h header, sigcontextinfo.h macros. 2018-03-22 16:40:51 +00:00
swapcontext.S RISC-V: Linux ABI 2018-01-29 10:37:27 -08:00
syscall.c RISC-V: Linux Syscall Interface 2018-01-29 10:27:52 -08:00
sysdep.h RISC-V: Linux Syscall Interface 2018-01-29 10:27:52 -08:00
sysdep.S RISC-V: Linux Syscall Interface 2018-01-29 10:27:52 -08:00
ucontext_i.sym RISC-V: Linux ABI 2018-01-29 10:37:27 -08:00
ucontext-macros.h RISC-V: Linux ABI 2018-01-29 10:37:27 -08:00
Versions RISC-V: Build Infastructure 2018-01-29 10:43:15 -08:00
vfork.S RISC-V: Linux Syscall Interface 2018-01-29 10:27:52 -08:00