summary refs log tree commit diff
path: root/nptl/eintr.c
diff options
context:
space:
mode:
authorMike Crowe <mac@mcrowe.com>2019-06-19 18:07:58 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-06-21 09:59:50 -0300
commitce5b73a7c3d8caefc72ac3b95490861e3ee13520 (patch)
treee6b816726b34c77c1b9569cacbb824dc4c960f94 /nptl/eintr.c
parent8bf225d5832eda8fefce9361c53cb68a55150b96 (diff)
downloadglibc-ce5b73a7c3d8caefc72ac3b95490861e3ee13520.tar.gz
glibc-ce5b73a7c3d8caefc72ac3b95490861e3ee13520.tar.xz
glibc-ce5b73a7c3d8caefc72ac3b95490861e3ee13520.zip
nptl: Convert various tests to use libsupport
	* nptl/eintr.c: Use libsupport.
	* nptl/tst-eintr1.c: Likewise.
	* nptl/tst-eintr2.c: Likewise.
	* nptl/tst-eintr3.c: Likewise.
	* nptl/tst-eintr4.c: Likewise.
	* nptl/tst-eintr5.c: Likewise.
	* nptl/tst-mutex-errorcheck.c: Likewise.
	* nptl/tst-mutex5.c: Likewise.
Diffstat (limited to 'nptl/eintr.c')
-rw-r--r--nptl/eintr.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/nptl/eintr.c b/nptl/eintr.c
index 4fc4d1c85c..6e644d2594 100644
--- a/nptl/eintr.c
+++ b/nptl/eintr.c
@@ -19,6 +19,9 @@
 #include <pthread.h>
 #include <signal.h>
 #include <unistd.h>
+#include <support/xthread.h>
+#include <support/xsignal.h>
+#include <support/xthread.h>
 
 
 static int the_sig;
@@ -46,7 +49,7 @@ eintr_source (void *arg)
       sigset_t ss;
       sigemptyset (&ss);
       sigaddset (&ss, the_sig);
-      pthread_sigmask (SIG_BLOCK, &ss, NULL);
+      xpthread_sigmask (SIG_BLOCK, &ss, NULL);
     }
 
   while (1)
@@ -79,10 +82,5 @@ setup_eintr (int sig, pthread_t *thp)
   the_sig = sig;
 
   /* Create the thread which will fire off the signals.  */
-  pthread_t th;
-  if (pthread_create (&th, NULL, eintr_source, thp) != 0)
-    {
-      puts ("setup_eintr: pthread_create failed");
-      exit (1);
-    }
+  xpthread_create (NULL, eintr_source, thp);
 }