(pthread_cancel): Use tkill directly.
authordrepper <drepper>
Fri, 21 Feb 2003 20:59:58 +0000 (20:59 +0000)
committerdrepper <drepper>
Fri, 21 Feb 2003 20:59:58 +0000 (20:59 +0000)
nptl/pthread_cancel.c

index 805e74f..4d6640b 100644 (file)
@@ -21,6 +21,7 @@
 #include <signal.h>
 #include "pthreadP.h"
 #include "atomic.h"
+#include <sysdep.h>
 
 
 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);
+
+         result = (INTERNAL_SYSCALL_ERROR_P (val, err)
+                   ? INTERNAL_SYSCALL_ERRNO (val, err) : 0);
 
          break;
        }