about summary refs log tree commit diff
path: root/sysdeps/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-02-09 16:38:33 +0100
committerFlorian Weimer <fweimer@redhat.com>2020-03-03 12:49:44 +0100
commitb03604b1b8c92d9af2d61d09654b06fccdeac8d5 (patch)
treed5daaddb97a467e429942e28f0470c26df21c427 /sysdeps/nptl
parent75376039be338702ed8904800fdcd3f1bc103ca7 (diff)
downloadglibc-b03604b1b8c92d9af2d61d09654b06fccdeac8d5.tar.gz
glibc-b03604b1b8c92d9af2d61d09654b06fccdeac8d5.tar.xz
glibc-b03604b1b8c92d9af2d61d09654b06fccdeac8d5.zip
Linux: set_robust_list syscall number is always available
Due to the built-in tables, __NR_set_robust_list is always defined
(although it may not be available at run time).

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/nptl')
-rw-r--r--sysdeps/nptl/fork.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
index f5cf88d68c..5091a000e3 100644
--- a/sysdeps/nptl/fork.c
+++ b/sysdeps/nptl/fork.c
@@ -83,7 +83,6 @@ __libc_fork (void)
       if (__fork_generation_pointer != NULL)
 	*__fork_generation_pointer += __PTHREAD_ONCE_FORK_GEN_INCR;
 
-#ifdef __NR_set_robust_list
       /* Initialize the robust mutex list setting in the kernel which has
 	 been reset during the fork.  We do not check for errors because if
 	 it fails here, it must have failed at process startup as well and
@@ -94,19 +93,18 @@ __libc_fork (void)
 	 inherit the correct value from the parent.  We do not need to clear
 	 the pending operation because it must have been zero when fork was
 	 called.  */
-# if __PTHREAD_MUTEX_HAVE_PREV
+#if __PTHREAD_MUTEX_HAVE_PREV
       self->robust_prev = &self->robust_head;
-# endif
+#endif
       self->robust_head.list = &self->robust_head;
-# ifdef SHARED
+#ifdef SHARED
       if (__builtin_expect (__libc_pthread_functions_init, 0))
 	PTHFCT_CALL (ptr_set_robust, (self));
-# else
+#else
       extern __typeof (__nptl_set_robust) __nptl_set_robust
 	__attribute__((weak));
       if (__builtin_expect (__nptl_set_robust != NULL, 0))
 	__nptl_set_robust (self);
-# endif
 #endif
 
       /* Reset the lock state in the multi-threaded case.  */