about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-04-21 19:49:51 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-04-21 19:49:51 +0200
commit66d99dc53a9aa2bbc7e8d7dd3ba3507d5ffe8597 (patch)
treea046f4d873f9207da87f4ba98e8879874b773411 /sysdeps
parent75376a3fb8429e3cf8275337ac56bf5f8127303b (diff)
downloadglibc-66d99dc53a9aa2bbc7e8d7dd3ba3507d5ffe8597.tar.gz
glibc-66d99dc53a9aa2bbc7e8d7dd3ba3507d5ffe8597.tar.xz
glibc-66d99dc53a9aa2bbc7e8d7dd3ba3507d5ffe8597.zip
nptl: Invoke the set_robust_list system call directly in fork
This removes one of the pthread forwarder functions.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/nptl/fork.c11
-rw-r--r--sysdeps/nptl/pthread-functions.h1
2 files changed, 2 insertions, 10 deletions
diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
index ccdda11a7c..f41c40fca0 100644
--- a/sysdeps/nptl/fork.c
+++ b/sysdeps/nptl/fork.c
@@ -104,15 +104,8 @@ __libc_fork (void)
       self->robust_prev = &self->robust_head;
 #endif
       self->robust_head.list = &self->robust_head;
-#ifdef SHARED
-      if (__builtin_expect (__libc_pthread_functions_init, 0))
-	PTHFCT_CALL (ptr_set_robust, (self));
-#else
-      extern __typeof (__nptl_set_robust) __nptl_set_robust
-	__attribute__((weak));
-      if (__builtin_expect (__nptl_set_robust != NULL, 0))
-	__nptl_set_robust (self);
-#endif
+      INTERNAL_SYSCALL_CALL (set_robust_list, &self->robust_head,
+			     sizeof (struct robust_list_head));
 
       /* Reset the lock state in the multi-threaded case.  */
       if (multiple_threads)
diff --git a/sysdeps/nptl/pthread-functions.h b/sysdeps/nptl/pthread-functions.h
index 2092ecef07..844838cd49 100644
--- a/sysdeps/nptl/pthread-functions.h
+++ b/sysdeps/nptl/pthread-functions.h
@@ -53,7 +53,6 @@ struct pthread_functions
   void *(*ptr___pthread_getspecific) (pthread_key_t);
   int (*ptr___pthread_setspecific) (pthread_key_t, const void *);
   int (*ptr__nptl_setxid) (struct xid_command *);
-  void (*ptr_set_robust) (struct pthread *);
 };
 
 /* Variable in libc.so.  */