From e814f74891ae248ee9d1a8d3caba9133c540e591 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 21 Feb 2003 21:07:28 +0000 Subject: Update. * pthread_cancel.c (pthread_cancel): Use tkill directly. * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Disallow sending SIGCANCEL. tst-kill3, tst-kill4, tst-kill5. * tst-kill1.c: New file. * tst-kill2.c: New file. * tst-kill3.c: New file. * tst-kill5.c: New file. * tst-basic7.c: Renamed to... * tst-kill4.c: ...this. --- nptl/pthread_cancel.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'nptl/pthread_cancel.c') diff --git a/nptl/pthread_cancel.c b/nptl/pthread_cancel.c index 805e74f2b1..f11a9243fb 100644 --- a/nptl/pthread_cancel.c +++ b/nptl/pthread_cancel.c @@ -21,6 +21,7 @@ #include #include "pthreadP.h" #include "atomic.h" +#include int @@ -56,7 +57,12 @@ pthread_cancel (th) /* The cancellation handler will take care of marking the thread as canceled. */ - result = __pthread_kill (th, SIGCANCEL); + INTERNAL_SYSCALL_DECL (err); + + int val = INTERNAL_SYSCALL (tkill, err, 2, pd->tid, SIGCANCEL); + + if (INTERNAL_SYSCALL_ERROR_P (val, err)) + result = INTERNAL_SYSCALL_ERRNO (val, err); break; } -- cgit 1.4.1