about summary refs log tree commit diff
path: root/nptl/eintr.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-12-20 06:34:59 +0000
committerUlrich Drepper <drepper@redhat.com>2003-12-20 06:34:59 +0000
commit4efdd8d355a378ab85278bef1c00c05c46ab49e4 (patch)
tree2711786af8a2b51279bfefbe3acb481bd45e2e6b /nptl/eintr.c
parent8a7455e70db36c00281a31f60e899d6b424e732b (diff)
downloadglibc-4efdd8d355a378ab85278bef1c00c05c46ab49e4.tar.gz
glibc-4efdd8d355a378ab85278bef1c00c05c46ab49e4.tar.xz
glibc-4efdd8d355a378ab85278bef1c00c05c46ab49e4.zip
Update.
2003-12-19  Ulrich Drepper  <drepper@redhat.com>

	* eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
	(eintr_source): If ARG != NULL, use pthread_kill.
	* tst-eintr1.c: Adjust for this change.
	* tst-eintr2.c: Likewise.
	* Makefile (tests): Add tst-eintr3 and tst-eintr4.
	* tst-eintr3.c: New file.
	* tst-eintr4.c: New file.

2003-12-19  Jakub Jelinek  <jakub@redhat.com>

	* libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
	if CANCELSTATE_BITMASK is set.
	* sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
	Likewise.

	* Makefile (tests): Add tst-cancel22 and tst-cancel23.
	(tests-reverse): Add tst-cancel23.
	* tst-cancel22.c: New test.
	* tst-cancel23.c: New test.
Diffstat (limited to 'nptl/eintr.c')
-rw-r--r--nptl/eintr.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/nptl/eintr.c b/nptl/eintr.c
index 64e5690981..9e5d6af09a 100644
--- a/nptl/eintr.c
+++ b/nptl/eintr.c
@@ -44,7 +44,10 @@ eintr_source (void *arg)
 
   while (1)
     {
-      kill (getpid (), the_sig);
+      if (arg != NULL)
+	pthread_kill (*(pthread_t *) arg, the_sig);
+      else
+	kill (getpid (), the_sig);
 
       nanosleep (&ts, NULL);
     }
@@ -55,7 +58,7 @@ eintr_source (void *arg)
 
 
 static void
-setup_eintr (int sig)
+setup_eintr (int sig, pthread_t *thp)
 {
   struct sigaction sa;
   sigemptyset (&sa.sa_mask);
@@ -70,7 +73,7 @@ setup_eintr (int sig)
 
   /* Create the thread which will fire off the signals.  */
   pthread_t th;
-  if (pthread_create (&th, NULL, eintr_source, NULL) != 0)
+  if (pthread_create (&th, NULL, eintr_source, thp) != 0)
     {
       puts ("setup_eintr: pthread_create failed");
       exit (1);