diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-04-17 18:02:33 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-04-17 18:02:33 +0000 |
commit | d7ba1313b9da6d39ca80d13c38186ce4fb7f2d92 (patch) | |
tree | bcbbf9aaa0cbfe049170b21591c6c4d8c4e817a6 /nptl | |
parent | 4efcb7139988577f534a2a8e969f1bb1cb9631fd (diff) | |
download | glibc-d7ba1313b9da6d39ca80d13c38186ce4fb7f2d92.tar glibc-d7ba1313b9da6d39ca80d13c38186ce4fb7f2d92.tar.gz glibc-d7ba1313b9da6d39ca80d13c38186ce4fb7f2d92.tar.bz2 glibc-d7ba1313b9da6d39ca80d13c38186ce4fb7f2d92.zip |
Update.
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.
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/ChangeLog | 6 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/timer_routines.c | 17 |
2 files changed, 21 insertions, 2 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index c37f1c9c09..b0eea29d94 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,9 @@ +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. + 2004-04-16 Ulrich Drepper <drepper@redhat.com> * allocatestack.c (allocate_stack): Set reported_guardsize 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 <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) { |