summary refs log tree commit diff
path: root/sysdeps/unix/sysdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysdep.h')
-rw-r--r--sysdeps/unix/sysdep.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/sysdeps/unix/sysdep.h b/sysdeps/unix/sysdep.h
index 2fa6bfa135..664d093c05 100644
--- a/sysdeps/unix/sysdep.h
+++ b/sysdeps/unix/sysdep.h
@@ -88,10 +88,17 @@
 #define INLINE_SYSCALL_CALL(...) \
   __INLINE_SYSCALL_DISP (__INLINE_SYSCALL, __VA_ARGS__)
 
+#if IS_IN (rtld)
+/* All cancellation points are compiled out in the dynamic loader.  */
+# define NO_SYSCALL_CANCEL_CHECKING 1
+#else
+# define NO_SYSCALL_CANCEL_CHECKING SINGLE_THREAD_P
+#endif
+
 #define SYSCALL_CANCEL(...) \
   ({									     \
     long int sc_ret;							     \
-    if (SINGLE_THREAD_P) 						     \
+    if (NO_SYSCALL_CANCEL_CHECKING)					     \
       sc_ret = INLINE_SYSCALL_CALL (__VA_ARGS__); 			     \
     else								     \
       {									     \
@@ -107,7 +114,7 @@
 #define INTERNAL_SYSCALL_CANCEL(...) \
   ({									     \
     long int sc_ret;							     \
-    if (SINGLE_THREAD_P) 						     \
+    if (NO_SYSCALL_CANCEL_CHECKING) 					     \
       sc_ret = INTERNAL_SYSCALL_CALL (__VA_ARGS__); 			     \
     else								     \
       {									     \