about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-17 09:59:14 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-17 10:25:12 +0200
commit2d53566ec3c622944bd3921c1ccb9391b2dbcb13 (patch)
tree49bd9a2d6f377c0136ae7360692f98c9a405942f /nptl
parent56f823abd43c897aa79d89b447fa31b6bb3f14db (diff)
downloadglibc-2d53566ec3c622944bd3921c1ccb9391b2dbcb13.tar.gz
glibc-2d53566ec3c622944bd3921c1ccb9391b2dbcb13.tar.xz
glibc-2d53566ec3c622944bd3921c1ccb9391b2dbcb13.zip
nptl: Move pthread_sigqueue into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

The GLIBC_2.11 version is now empty, so add a placeholder symbol.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/Versions6
-rw-r--r--nptl/libpthread-compat.c5
-rw-r--r--nptl/pthread_sigqueue.c11
4 files changed, 19 insertions, 5 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index d4cff359b5..bd5a9ce51f 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -179,6 +179,7 @@ routines = \
   pthread_setschedprio \
   pthread_setspecific \
   pthread_sigmask \
+  pthread_sigqueue \
   pthread_spin_destroy \
   pthread_spin_init \
   pthread_spin_lock \
@@ -211,7 +212,6 @@ libpthread-routines = \
   nptl-init \
   pt-interp \
   pthread_create \
-  pthread_sigqueue \
   version \
 
 libpthread-shared-only-routines = \
diff --git a/nptl/Versions b/nptl/Versions
index 1629441f11..e7883cbb49 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -187,6 +187,9 @@ libc {
     pthread_mutexattr_setprotocol;
     pthread_mutexattr_setrobust_np;
   }
+  GLIBC_2.11 {
+    pthread_sigqueue;
+  }
   GLIBC_2.12 {
     pthread_getname_np;
     pthread_mutex_consistent;
@@ -335,6 +338,7 @@ libc {
     pthread_setname_np;
     pthread_setschedprio;
     pthread_setspecific;
+    pthread_sigqueue;
     pthread_spin_destroy;
     pthread_spin_init;
     pthread_spin_lock;
@@ -472,7 +476,7 @@ libpthread {
   };
 
   GLIBC_2.11 {
-    pthread_sigqueue;
+    __libpthread_version_placeholder;
   };
 
   GLIBC_2.12 {
diff --git a/nptl/libpthread-compat.c b/nptl/libpthread-compat.c
index 4d29a4c781..7e3e7aa0c3 100644
--- a/nptl/libpthread-compat.c
+++ b/nptl/libpthread-compat.c
@@ -85,6 +85,11 @@ compat_symbol (libpthread, __libpthread_version_placeholder_1,
 	       __libpthread_version_placeholder, GLIBC_2_4);
 #endif
 
+#if SHLIB_COMPAT (libpthread, GLIBC_2_11, GLIBC_2_12)
+compat_symbol (libpthread, __libpthread_version_placeholder_1,
+	       __libpthread_version_placeholder, GLIBC_2_11);
+#endif
+
 #if SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_13)
 compat_symbol (libpthread, __libpthread_version_placeholder_1,
 	       __libpthread_version_placeholder, GLIBC_2_12);
diff --git a/nptl/pthread_sigqueue.c b/nptl/pthread_sigqueue.c
index 3ffb595489..2a0467ad7a 100644
--- a/nptl/pthread_sigqueue.c
+++ b/nptl/pthread_sigqueue.c
@@ -23,10 +23,10 @@
 #include <pthreadP.h>
 #include <tls.h>
 #include <sysdep.h>
-
+#include <shlib-compat.h>
 
 int
-pthread_sigqueue (pthread_t threadid, int signo, const union sigval value)
+__pthread_sigqueue (pthread_t threadid, int signo, const union sigval value)
 {
 #ifdef __NR_rt_tgsigqueueinfo
   struct pthread *pd = (struct pthread *) threadid;
@@ -52,7 +52,7 @@ pthread_sigqueue (pthread_t threadid, int signo, const union sigval value)
   info.si_signo = signo;
   info.si_code = SI_QUEUE;
   info.si_pid = pid;
-  info.si_uid = getuid ();
+  info.si_uid = __getuid ();
   info.si_value = value;
 
   /* We have a special syscall to do the work.  */
@@ -64,3 +64,8 @@ pthread_sigqueue (pthread_t threadid, int signo, const union sigval value)
   return ENOSYS;
 #endif
 }
+versioned_symbol (libc, __pthread_sigqueue, pthread_sigqueue, GLIBC_2_34);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_11, GLIBC_2_34)
+compat_symbol (libpthread, __pthread_sigqueue, pthread_sigqueue, GLIBC_2_11);
+#endif