]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Add getcpu
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 7 Dec 2018 17:17:37 +0000 (09:17 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 7 Dec 2018 17:17:50 +0000 (09:17 -0800)
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.

35 files changed:
ChangeLog
NEWS
include/sched.h
manual/resource.texi
sysdeps/unix/sysv/linux/Makefile
sysdeps/unix/sysv/linux/Versions
sysdeps/unix/sysv/linux/aarch64/libc.abilist
sysdeps/unix/sysv/linux/alpha/libc.abilist
sysdeps/unix/sysv/linux/arm/libc.abilist
sysdeps/unix/sysv/linux/bits/sched.h
sysdeps/unix/sysv/linux/getcpu.c [new file with mode: 0644]
sysdeps/unix/sysv/linux/hppa/libc.abilist
sysdeps/unix/sysv/linux/i386/libc.abilist
sysdeps/unix/sysv/linux/ia64/libc.abilist
sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
sysdeps/unix/sysv/linux/microblaze/libc.abilist
sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
sysdeps/unix/sysv/linux/nios2/libc.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
sysdeps/unix/sysv/linux/sh/libc.abilist
sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
sysdeps/unix/sysv/linux/tst-skeleton-affinity.c
sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist

index e137a0dc7740935934c7c72c53d03f887fb3cf55..616e3705e14d2a80c2b6c98d9f93e485b5fbccf7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,46 @@
+2018-12-07  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * 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  Samuel Thibault  <samuel.thibault@ens-lyon.org>
 
        * sysdeps/mach/hurd/spawni.c (child_lookup_under, child_fchdir): New
diff --git a/NEWS b/NEWS
index f338c32e92011fbcb613320168057fd646ab1427..ae80818df4b3e791631403b26d07669d4b3ce66b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,9 @@ Version 2.29
 
 Major new features:
 
+* The getcpu wrapper function has been added, which returns the currently
+  used CPU and NUMA node.  This function is Linux-specific.
+
 * A new convenience target has been added for distribution maintainers
   to build and install all locales as directories with files.  The new
   target is run by issuing the following command in your build tree:
index b698f7866689035a8138818b130de79d3dde581c..0843c26d73752594421425226a35ca43706a67d7 100644 (file)
@@ -26,5 +26,7 @@ libc_hidden_proto (__clone)
 extern int __clone2 (int (*__fn) (void *__arg), void *__child_stack_base,
                     size_t __child_stack_size, int __flags, void *__arg, ...);
 libc_hidden_proto (__clone2)
+extern __typeof__ (getcpu) __getcpu;
+libc_hidden_proto (__getcpu)
 #endif
 #endif
index 8bc2a803d43ae7e72025af1cd518bb12e8ec614c..8c4c92a184a5bddb4513de9d60af0a6599977e9f 100644 (file)
@@ -1429,6 +1429,27 @@ not leave a processor for the process or thread to run on.
 This function is a GNU extension and is declared in @file{sched.h}.
 @end deftypefun
 
+@deftypefun int getcpu (unsigned int *cpu, unsigned int *node)
+@standards{Linux, <sched.h>}
+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
+The @code{getcpu} function identifies the processor and node on which
+the calling thread or process is currently running and writes them into
+the integers pointed to by the @var{cpu} and @var{node} arguments.  The
+processor is a unique nonnegative integer identifying a CPU.  The node
+is a unique nonnegative integer identifying a NUMA node.  When either
+@var{cpu} or @var{node} is @code{NULL}, nothing is written to the
+respective pointer.
+
+The return value is @code{0} on success and @code{-1} on failure.  The
+following @code{errno} error condition is defined for this function:
+
+@table @code
+@item ENOSYS
+The operating system does not support this function.
+@end table
+
+This function is Linux-specific and is declared in @file{sched.h}.
+@end deftypefun
 
 @node Memory Resources
 @section Querying memory available resources
index 362cf3b950324e52268016a66c12f427f556df38..988855d8972b06c54af162d252ba86cb5c763d02 100644 (file)
@@ -142,7 +142,7 @@ endif
 ifeq ($(subdir),posix)
 sysdep_headers += bits/initspin.h
 
-sysdep_routines += sched_getcpu oldglob
+sysdep_routines += sched_getcpu oldglob getcpu
 
 tests += tst-affinity tst-affinity-pid
 
index 336c13b57dba727ab79691bb7844f7ceb291424c..f1e12d9c690661507286a5339ca696142aa4b81e 100644 (file)
@@ -171,6 +171,9 @@ libc {
     mlock2;
     pkey_alloc; pkey_free; pkey_set; pkey_get; pkey_mprotect;
   }
+  GLIBC_2.29 {
+    getcpu;
+  }
   GLIBC_PRIVATE {
     # functions used in other libraries
     __syscall_rt_sigqueueinfo;
index 8763e7b6188ab740166a1301f9276f3a97649dab..9c330f325e32adc2518cf657972ffb8abf88c5e5 100644 (file)
@@ -2138,5 +2138,6 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
index c7dfef32d63b9a07834152d0a5a99f5aaaa0b90b..f630fa4c6fcd6c17cb933c9ca771121354d35e58 100644 (file)
@@ -2033,6 +2033,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index a306d13a0f4beb201da1fdc32d7c5b8ab453f3b3..b96f45590f554469aa1a3eab0d16a043c2f49eb8 100644 (file)
@@ -123,6 +123,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.4 _Exit F
index 34f27a7d9b9f49d4be826f89234cf0fe45c95c8f..ea5d51a80d4163ba8c2ae01ff09cbc6e9bfa4a85 100644 (file)
@@ -86,6 +86,9 @@ extern int unshare (int __flags) __THROW;
 /* Get index of currently used CPU.  */
 extern int sched_getcpu (void) __THROW;
 
+/* Get currently used CPU and NUMA node.  */
+extern int getcpu (unsigned int *, unsigned int *) __THROW;
+
 /* Switch process to namespace of type NSTYPE indicated by FD.  */
 extern int setns (int __fd, int __nstype) __THROW;
 #endif
diff --git a/sysdeps/unix/sysv/linux/getcpu.c b/sysdeps/unix/sysv/linux/getcpu.c
new file mode 100644 (file)
index 0000000..59c6cc4
--- /dev/null
@@ -0,0 +1,38 @@
+/* Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <sched.h>
+#include <sysdep.h>
+
+#ifdef HAVE_GETCPU_VSYSCALL
+# define HAVE_VSYSCALL
+#endif
+#include <sysdep-vdso.h>
+
+int
+__getcpu (unsigned int *cpu, unsigned int *node)
+{
+#ifdef __NR_getcpu
+  return INLINE_VSYSCALL (getcpu, 3, cpu, node, NULL);
+#else
+  __set_errno (ENOSYS);
+  return -1;
+#endif
+}
+weak_alias (__getcpu, getcpu)
+libc_hidden_def (__getcpu)
index 4285936c2cc8ba98318ce570a7862d7f3380f2a5..088a8ee3696029001532acc4412298ec8ee14218 100644 (file)
@@ -1880,6 +1880,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index d19039919217085a98376898b94fa98904fac2fa..f7ff2c57b91543e9138e40fc89d5da567b70a5ba 100644 (file)
@@ -2045,6 +2045,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index 918daeb3483ad5e91f85ded2ce2f34916525bfe4..becd8b103359f8a20cf64547d419a5c61b4fcda4 100644 (file)
@@ -1914,6 +1914,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index c9e534cf8bcdbebedab06cb5ec0553227e7d5cae..74e42a5209936c276790ddd11e78d4b928dbb7dd 100644 (file)
@@ -124,6 +124,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.4 _Exit F
index c8e70be87672af1eb9fc91f0a9eedff0b298c66b..4af5a74e8a47d619f5661977ea60ff150fd2d51d 100644 (file)
@@ -1989,6 +1989,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index e356ec6d33e3d778fc825ebae3b17226bf81b1f0..ccef673fd22f57b5a3d4556c43e663b7b10e4986 100644 (file)
@@ -2130,5 +2130,6 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
index 3154251d25d7ce3f9f2fa9b6d05bb6d00b24904c..1054bb599e5c1f00b0cd9545c39a4ff28fc242ed 100644 (file)
@@ -1967,6 +1967,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index e9445adf1451acf2fe2fd2523406fbcea7c1b948..4f5b5ffebf975663ced26cc099d04a65680b8a9a 100644 (file)
@@ -1965,6 +1965,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index 4043077bc39fa610c8f31740a2459535f0c7272a..943aee58d443057c08a985e361ae4438167ef4f9 100644 (file)
@@ -1973,6 +1973,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index e47cb434dcd1d380ce67f5e9774637a3a2f8e3f4..17a5d17ef9e007f0212baf049fc6ca639572c8f0 100644 (file)
@@ -1968,6 +1968,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index 024c55f29ec43fc52970e580d561030a7e29f93a..4d62a540fd02701a3ba34d82ce3cf966dda013d2 100644 (file)
@@ -2171,5 +2171,6 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
index 5c26044f5ee6b3676cb48a7c11b93ff8902b7293..ecc2d6fa13e3f09713bcf3e4b160e47a8eed9836 100644 (file)
@@ -1993,6 +1993,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index a12e7b670890367805c5326280e5f5cb46cc099c..f5830f9c33fc37afb7a1c9e2cbd3f4acf733e675 100644 (file)
@@ -1997,6 +1997,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index 939978e2af2c914cdf9324e740279e38ac7fe323..2c712636ef13c75cec3ab5146776c95c3a72c6dd 100644 (file)
@@ -2228,5 +2228,6 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
index 82f5aeed339100db1f9828cc0eb9c6f61939c114..633d8f4792987f412d51d12e4db907a07c362191 100644 (file)
@@ -123,6 +123,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 _Exit F
index 9e7c904d2cfdad3981a8e131cd4285bfaea3aee4..195bc8b2cf28be1936db8abb2d22662a8df4ec82 100644 (file)
@@ -2100,5 +2100,6 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
index f4a52b543af10a859f69b52d61c31d554c583cb1..334def033c375afe5f8646dca9043c6e717d59f7 100644 (file)
@@ -2002,6 +2002,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index 8d8a4035bb758d71144e2dcd207be93f3978d58e..536f4c4ced282049e84c835e687794f0481158ba 100644 (file)
@@ -1908,6 +1908,7 @@ GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
 GLIBC_2.29 __fentry__ F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index 5c055558422f574df837a571a24b11f2013842eb..30ae3b6ebb6510f6eecb04eb1e80b21fb4d2166f 100644 (file)
@@ -1884,6 +1884,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index 4d4e972d588ffbcf394ef05da52108751aa61535..68b107d08058c383a5eb71ca87d28e4c02d00307 100644 (file)
@@ -1996,6 +1996,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index 96ad7b83258df891ac2904ddeb1fb0bae046c97e..e5b6a4da50e9295da4ca5db1c66a9ba61c547dc5 100644 (file)
@@ -1937,6 +1937,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index 695c1ccdbd056fc151a1d1a07ab4de7cbe7cf796..0f11eeb37cf7ff64af302dd94c6b3bb23643e191 100644 (file)
@@ -189,6 +189,18 @@ test_size (const struct conf *conf, size_t size)
          printf ("error: Unexpected CPU %d, expected %d\n", active_cpu, cpu);
          return false;
        }
+      unsigned int numa_cpu, numa_node;
+      if (getcpu (&numa_cpu, &numa_node) != 0)
+       {
+         printf ("error: getcpu: %m\n");
+         return false;
+       }
+      if ((unsigned int) active_cpu != numa_cpu)
+       {
+         printf ("error: Unexpected CPU %d, expected %d\n",
+                 active_cpu, numa_cpu);
+         return false;
+       }
       if (getaffinity (kernel_size, set2) < 0)
        {
          printf ("error: size %zu: getaffinity (2): %m\n", size);
index 52e65c50206a76558e9c357e9b9d38873c43dde0..86dfb0c94d66f586aa590cb5b0a9734b6970c18c 100644 (file)
@@ -1895,6 +1895,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.3 __ctype_b_loc F
index dccc15bb67d158fcfc6da6dfa6cb1773d6f0a461..dd688263aa728f84abbf5814b12beaf1739f0fab 100644 (file)
@@ -2146,5 +2146,6 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 getcpu F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F