From d7ba1313b9da6d39ca80d13c38186ce4fb7f2d92 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 17 Apr 2004 18:02:33 +0000 Subject: Update. 2004-04-15 Jakub Jelinek * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h. (timer_helper_thread): Use inline rt_sigtimedwait syscall instead of calling sigwaitinfo. --- nptl/sysdeps/unix/sysv/linux/timer_routines.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'nptl/sysdeps/unix') diff --git a/nptl/sysdeps/unix/sysv/linux/timer_routines.c b/nptl/sysdeps/unix/sysv/linux/timer_routines.c index b0d6ef91bf..f0a68e8f4d 100644 --- a/nptl/sysdeps/unix/sysv/linux/timer_routines.c +++ b/nptl/sysdeps/unix/sysv/linux/timer_routines.c @@ -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 , 2003. @@ -17,6 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include #include @@ -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) { -- cgit 1.4.1