summaryrefslogtreecommitdiff
path: root/nptl/eintr.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2019-12-16 21:19:30 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-12-16 21:19:30 +0100
commit10f1958417a4944a60a08230eae6a639209d52f8 (patch)
tree7662166d1cf40507e65fba6dbb9ee73a7c652afc /nptl/eintr.c
parent963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff)
parenta2e487ce1c59d19345d9ecacc58de79febd869e4 (diff)
Merge branch 'master' of git://sourceware.org/git/glibc into upstreamupstream
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);
}