From 2d53566ec3c622944bd3921c1ccb9391b2dbcb13 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 17 May 2021 09:59:14 +0200 Subject: 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 --- nptl/Makefile | 2 +- nptl/Versions | 6 +++++- nptl/libpthread-compat.c | 5 +++++ nptl/pthread_sigqueue.c | 11 ++++++++--- 4 files changed, 19 insertions(+), 5 deletions(-) (limited to 'nptl') diff --git a/nptl/Makefile b/nptl/Makefile index d4cff35..bd5a9ce 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 1629441..e7883cb 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 4d29a4c..7e3e7aa 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 3ffb595..2a0467a 100644 --- a/nptl/pthread_sigqueue.c +++ b/nptl/pthread_sigqueue.c @@ -23,10 +23,10 @@ #include #include #include - +#include 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 -- cgit v1.1