summaryrefslogtreecommitdiff
path: root/nptl/eintr.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/eintr.c')
-rw-r--r--nptl/eintr.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/nptl/eintr.c b/nptl/eintr.c
index 3c6cff2f37..5f5d358763 100644
--- a/nptl/eintr.c
+++ b/nptl/eintr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003-2018 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -14,11 +14,14 @@
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#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);
}