/* Helper code for POSIX timer implementation on NPTL.
- Copyright (C) 2000-2018 Free Software Foundation, Inc.
+ Copyright (C) 2000-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kaz Kylheku <kaz@ashi.footprints.net>.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; see the file COPYING.LIB. If
- not, see <http://www.gnu.org/licenses/>. */
+ not, see <https://www.gnu.org/licenses/>. */
#include <assert.h>
#include <errno.h>
#include <sys/syscall.h>
#include "posix-timer.h"
-#include <internaltypes.h>
+#include <timer_routines.h>
#ifndef DELAYTIMER_MAX
# define DELAYTIMER_MAX INT_MAX
/* This assumes that the elements of the list of one thread
are all for the same clock. */
- clock_gettime (timer->clock, &now);
+ __clock_gettime (timer->clock, &now);
while (1)
{
__timer_thread_start (struct thread_node *thread)
{
int retval = 1;
+ sigset_t set, oset;
assert (!thread->exists);
thread->exists = 1;
+ sigfillset (&set);
+ pthread_sigmask (SIG_SETMASK, &set, &oset);
+
if (pthread_create (&thread->id, &thread->attr,
(void *(*) (void *)) thread_func, thread) != 0)
{
retval = -1;
}
+ pthread_sigmask (SIG_SETMASK, &oset, NULL);
+
return retval;
}