about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile5
-rw-r--r--nptl/Versions6
-rw-r--r--nptl/nptl-init.c5
-rw-r--r--nptl/pt-raise.c29
-rw-r--r--nptl/pthread_kill.c5
-rw-r--r--nptl/pthread_self.c3
6 files changed, 15 insertions, 38 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 167f2cc24b..bf31da0ee5 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -29,7 +29,7 @@ extra-libs-others := $(extra-libs)
 
 routines = alloca_cutoff forward libc-lowlevellock libc-cancellation \
 	   libc-cleanup libc_pthread_init libc_multiple_threads \
-	   register-atfork pthread_atfork pthread_self
+	   register-atfork pthread_atfork pthread_self pthread_kill
 shared-only-routines = forward
 static-only-routines = pthread_atfork
 
@@ -90,7 +90,7 @@ libpthread-routines = nptl-init vars events version pt-interp \
 		      pthread_barrierattr_setpshared \
 		      pthread_key_create pthread_key_delete \
 		      pthread_getspecific pthread_setspecific \
-		      pthread_sigmask pthread_kill pthread_sigqueue \
+		      pthread_sigmask pthread_sigqueue \
 		      pthread_cancel pthread_testcancel \
 		      pthread_setcancelstate pthread_setcanceltype \
 		      pthread_once \
@@ -108,7 +108,6 @@ libpthread-routines = nptl-init vars events version pt-interp \
 		      cancellation \
 		      lowlevellock \
 		      lll_timedlock_wait lll_timedwait_tid \
-		      pt-raise \
 		      pt-compat-stubs \
 		      flockfile ftrylockfile funlockfile \
 		      sigaction \
diff --git a/nptl/Versions b/nptl/Versions
index 0ae5def464..18c96e851c 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -28,6 +28,9 @@ libc {
     pthread_cond_wait; pthread_cond_signal;
     pthread_cond_broadcast; pthread_cond_timedwait;
   }
+  GLIBC_2.28 {
+    pthread_kill;
+  }
   GLIBC_PRIVATE {
     __libc_alloca_cutoff;
     # Internal libc interface to libpthread
@@ -36,6 +39,9 @@ libc {
     __libc_pthread_init;
     __libc_current_sigrtmin_private; __libc_current_sigrtmax_private;
     __libc_allocate_rtsig_private;
+    # Used by compat stubs
+    __libc_pthread_kill;
+    __libc_raise;
   }
 }
 
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index 5a4b52419f..77fa9d9cde 100644
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -37,7 +37,6 @@
 #include <futex-internal.h>
 #include <kernel-features.h>
 #include <libc-pointer-arith.h>
-#include <pthread-pids.h>
 
 #ifndef TLS_MULTIPLE_THREADS_IN_TCB
 /* Pointer to the corresponding variable in libc.  */
@@ -283,9 +282,9 @@ static bool __nptl_initial_report_events __attribute_used__;
 void
 __pthread_initialize_minimal_internal (void)
 {
-  /* Minimal initialization of the thread descriptor.  */
+  /* Minimal initialization of the thread descriptor.
+     pd->tid was set during TLS initialization.  */
   struct pthread *pd = THREAD_SELF;
-  __pthread_initialize_pids (pd);
   THREAD_SETMEM (pd, specific[0], &pd->specific_1stblock[0]);
   THREAD_SETMEM (pd, user_stack, true);
   if (LLL_LOCK_INITIALIZER != 0)
diff --git a/nptl/pt-raise.c b/nptl/pt-raise.c
deleted file mode 100644
index c4d3893a4d..0000000000
--- a/nptl/pt-raise.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* ISO C raise function for libpthread.
-   Copyright (C) 2002-2018 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
-   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 <pthread.h>
-#include <signal.h>
-
-
-int
-raise (int sig)
-{
-  /* This is what POSIX says must happen.  */
-  return pthread_kill (pthread_self (), sig);
-}
diff --git a/nptl/pthread_kill.c b/nptl/pthread_kill.c
index bbe57d18c6..c682a422d1 100644
--- a/nptl/pthread_kill.c
+++ b/nptl/pthread_kill.c
@@ -22,7 +22,7 @@
 
 
 int
-__pthread_kill (pthread_t threadid, int signo)
+__libc_pthread_kill (pthread_t threadid, int signo)
 {
   struct pthread *pd = (struct pthread *) threadid;
 
@@ -33,6 +33,7 @@ __pthread_kill (pthread_t threadid, int signo)
 
   return ENOSYS;
 }
-strong_alias (__pthread_kill, pthread_kill)
+strong_alias (__libc_pthread_kill, __pthread_kill)
+weak_alias (__libc_pthread_kill, pthread_kill)
 
 stub_warning (pthread_kill)
diff --git a/nptl/pthread_self.c b/nptl/pthread_self.c
index ae173c4661..bcf32068ea 100644
--- a/nptl/pthread_self.c
+++ b/nptl/pthread_self.c
@@ -20,7 +20,8 @@
 #include <tls.h>
 
 pthread_t
-pthread_self (void)
+__pthread_self (void)
 {
   return (pthread_t) THREAD_SELF;
 }
+weak_alias (__pthread_self, pthread_self)