summaryrefslogtreecommitdiff
path: root/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux/raise.c')
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/raise.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c b/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
index da35cfe9f..708ed6d76 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
@@ -30,7 +30,7 @@ raise (
int sig)
{
struct pthread *pd = THREAD_SELF;
-#if __ASSUME_TGKILL || defined __NR_tgkill
+#if (defined(__ASSUME_TGKILL) && __ASSUME_TGKILL) || defined __NR_tgkill
pid_t pid = THREAD_GETMEM (pd, pid);
#endif
pid_t selftid = THREAD_GETMEM (pd, tid);
@@ -45,13 +45,13 @@ raise (
#endif
THREAD_SETMEM (pd, tid, selftid);
-#if __ASSUME_TGKILL || defined __NR_tgkill
+#if (defined(__ASSUME_TGKILL) && __ASSUME_TGKILL) || defined __NR_tgkill
/* We do not set the PID field in the TID here since we might be
called from a signal handler while the thread executes fork. */
pid = selftid;
#endif
}
-#if __ASSUME_TGKILL || defined __NR_tgkill
+#if (defined(__ASSUME_TGKILL) && __ASSUME_TGKILL) || defined __NR_tgkill
else
/* raise is an async-safe function. It could be called while the
fork/vfork function temporarily invalidated the PID field. Adjust for
@@ -60,7 +60,7 @@ raise (
pid = (pid & INT_MAX) == 0 ? selftid : -pid;
#endif
-#if __ASSUME_TGKILL
+#if defined(__ASSUME_TGKILL) && __ASSUME_TGKILL
return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
#else
# ifdef __NR_tgkill