diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-07-08 03:40:49 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-07-08 03:40:49 +0000 |
commit | db54f488ee24b14027c485e0005950dfdd5ef885 (patch) | |
tree | 2a07a1746c1ffa758a34484f65263c737818d162 /nptl/sysdeps/unix/sysv/linux/pt-raise.c | |
parent | 5fee5ad11c5307141f76aa7ea28ec1e1b6418fea (diff) | |
download | glibc-db54f488ee24b14027c485e0005950dfdd5ef885.tar glibc-db54f488ee24b14027c485e0005950dfdd5ef885.tar.gz glibc-db54f488ee24b14027c485e0005950dfdd5ef885.tar.bz2 glibc-db54f488ee24b14027c485e0005950dfdd5ef885.zip |
Update.
2003-07-07 Ulrich Drepper <drepper@redhat.com>
* descr.h (struct pthread): Add pid field.
* allocatestack.c (allocate_stack): Initialize pid field in descriptor.
(__reclaim_stacks): Likewise.
* init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
also check for PID of the signal source.
(__pthread_initialize_minimal_internal): Also initialize pid field
of initial thread's descriptor.
* pthread_cancel.c: Use tgkill instead of tkill if possible.
* sysdeps/unix/sysv/linux/fork.c: Likewise.
* sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
* sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
* sysdeps/unix/sysv/linux/raise.c: Likewise.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/pt-raise.c')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/pt-raise.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/pt-raise.c b/nptl/sysdeps/unix/sysv/linux/pt-raise.c index 0c68960e5d..2efd7616bf 100644 --- a/nptl/sysdeps/unix/sysv/linux/pt-raise.c +++ b/nptl/sysdeps/unix/sysv/linux/pt-raise.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -21,11 +21,23 @@ #include <signal.h> #include <sysdep.h> #include <tls.h> +#include <kernel-features.h> int raise (sig) int sig; { - return INLINE_SYSCALL (tkill, 2, THREAD_SELF->tid, sig); +#if __ASSUME_TGKILL + return INLINE_SYSCALL (tgkill, 3, THREAD_GETMEM (THREAD_SELF, pid), + THREAD_GETMEM (THREAD_SELF, tid), sig); +#else +# ifdef __NR_tgkill + int res = INLINE_SYSCALL (tgkill, 3, THREAD_GETMEM (THREAD_SELF, pid), + THREAD_GETMEM (THREAD_SELF, tid), sig); + if (res != -1 || errno != ENOSYS) + return res; +# endif + return INLINE_SYSCALL (tkill, 2, THREAD_GETMEM (THREAD_SELF, tid), sig); +#endif } |