1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
2004-04-15  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
	(timer_helper_thread): Use inline rt_sigtimedwait syscall instead
	of calling sigwaitinfo.
This commit is contained in:
Ulrich Drepper
2004-04-17 18:02:33 +00:00
parent 4efcb71399
commit d7ba1313b9
3 changed files with 67 additions and 25 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2003 Free Software Foundation, Inc.
/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
@ -17,6 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <setjmp.h>
#include <signal.h>
#include <stdbool.h>
@ -61,7 +62,19 @@ timer_helper_thread (void *arg)
{
siginfo_t si;
if (sigwaitinfo (&ss, &si) > 0)
/* sigwaitinfo cannot be used here, since it deletes
SIGCANCEL == SIGTIMER from the set. */
int oldtype = LIBC_CANCEL_ASYNC ();
/* XXX The size argument hopefully will have to be changed to the
real size of the user-level sigset_t. */
int result = INLINE_SYSCALL (rt_sigtimedwait, 4, &ss, &si, NULL,
_NSIG / 8);
LIBC_CANCEL_RESET (oldtype);
if (result > 0)
{
if (si.si_code == SI_TIMER)
{