summary refs log tree commit diff
path: root/nptl/pthread_cancel.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-02-21 21:07:28 +0000
committerUlrich Drepper <drepper@redhat.com>2003-02-21 21:07:28 +0000
commite814f74891ae248ee9d1a8d3caba9133c540e591 (patch)
treeca1e4bdf36e852e5121bfc12a47a16cfc16c59cf /nptl/pthread_cancel.c
parentab2d98e38e085f83fca961876dd6c0e176f52be1 (diff)
downloadglibc-e814f74891ae248ee9d1a8d3caba9133c540e591.tar.gz
glibc-e814f74891ae248ee9d1a8d3caba9133c540e591.tar.xz
glibc-e814f74891ae248ee9d1a8d3caba9133c540e591.zip
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.
Diffstat (limited to 'nptl/pthread_cancel.c')
-rw-r--r--nptl/pthread_cancel.c8
1 files changed, 7 insertions, 1 deletions
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 <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);
+
+	  if (INTERNAL_SYSCALL_ERROR_P (val, err))
+	    result = INTERNAL_SYSCALL_ERRNO (val, err);
 
 	  break;
 	}