mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
Update.
* sysdeps/unix/sysv/linux/sigtimedwait.c: If SIGCANCEL is defined and part of the incoming set, create a temporary set without this signal. * sysdeps/unix/sysv/linux/sigwait.c: Likewise. * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. returning because seconds==0. Add __builtin_expect.
This commit is contained in:
@ -1,7 +1,13 @@
|
|||||||
2003-06-17 Ulrich Drepper <drepper@redhat.com>
|
2003-06-17 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/sigtimedwait.c: If SIGCANCEL is defined
|
||||||
|
and part of the incoming set, create a temporary set without this
|
||||||
|
signal.
|
||||||
|
* sysdeps/unix/sysv/linux/sigwait.c: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/sleep.c: Use CANCELLATION_P if defined before
|
* sysdeps/unix/sysv/linux/sleep.c: Use CANCELLATION_P if defined before
|
||||||
returning because seconds==0.
|
returning because seconds==0. Add __builtin_expect.
|
||||||
|
|
||||||
2003-06-16 Ulrich Drepper <drepper@redhat.com>
|
2003-06-16 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
@ -32,6 +32,18 @@ static int
|
|||||||
do_sigtimedwait (const sigset_t *set, siginfo_t *info,
|
do_sigtimedwait (const sigset_t *set, siginfo_t *info,
|
||||||
const struct timespec *timeout)
|
const struct timespec *timeout)
|
||||||
{
|
{
|
||||||
|
#ifdef SIGCANCEL
|
||||||
|
sigset_t tmpset;
|
||||||
|
if (set != NULL && __sigismember (set, SIGCANCEL))
|
||||||
|
{
|
||||||
|
/* Create a temporary mask without the bit for SIGCANCEL set. */
|
||||||
|
// We are not copying more than we have to.
|
||||||
|
memcpy (&tmpset, set, _NSIG / 8);
|
||||||
|
__sigdelset (&tmpset, SIGCANCEL);
|
||||||
|
set = &tmpset;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* XXX The size argument hopefully will have to be changed to the
|
/* XXX The size argument hopefully will have to be changed to the
|
||||||
real size of the user-level sigset_t. */
|
real size of the user-level sigset_t. */
|
||||||
int result = INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
|
int result = INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
|
/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -36,6 +36,18 @@ do_sigwait (const sigset_t *set, int *sig)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
#ifdef SIGCANCEL
|
||||||
|
sigset_t tmpset;
|
||||||
|
if (set != NULL && __sigismember (set, SIGCANCEL))
|
||||||
|
{
|
||||||
|
/* Create a temporary mask without the bit for SIGCANCEL set. */
|
||||||
|
// We are not copying more than we have to.
|
||||||
|
memcpy (&tmpset, set, _NSIG / 8);
|
||||||
|
__sigdelset (&tmpset, SIGCANCEL);
|
||||||
|
set = &tmpset;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* XXX The size argument hopefully will have to be changed to the
|
/* XXX The size argument hopefully will have to be changed to the
|
||||||
real size of the user-level sigset_t. */
|
real size of the user-level sigset_t. */
|
||||||
#ifdef INTERNAL_SYSCALL
|
#ifdef INTERNAL_SYSCALL
|
||||||
|
@ -33,6 +33,18 @@ extern int __syscall_rt_sigtimedwait (const sigset_t *__unbounded, siginfo_t *__
|
|||||||
static int
|
static int
|
||||||
do_sigwaitinfo (const sigset_t *set, siginfo_t *info)
|
do_sigwaitinfo (const sigset_t *set, siginfo_t *info)
|
||||||
{
|
{
|
||||||
|
#ifdef SIGCANCEL
|
||||||
|
sigset_t tmpset;
|
||||||
|
if (set != NULL && __sigismember (set, SIGCANCEL))
|
||||||
|
{
|
||||||
|
/* Create a temporary mask without the bit for SIGCANCEL set. */
|
||||||
|
// We are not copying more than we have to.
|
||||||
|
memcpy (&tmpset, set, _NSIG / 8);
|
||||||
|
__sigdelset (&tmpset, SIGCANCEL);
|
||||||
|
set = &tmpset;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* XXX The size argument hopefully will have to be changed to the
|
/* XXX The size argument hopefully will have to be changed to the
|
||||||
real size of the user-level sigset_t. */
|
real size of the user-level sigset_t. */
|
||||||
int result = INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
|
int result = INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
|
||||||
|
@ -34,7 +34,7 @@ __sleep (unsigned int seconds)
|
|||||||
unsigned int result;
|
unsigned int result;
|
||||||
|
|
||||||
/* This is not necessary but some buggy programs depend on this. */
|
/* This is not necessary but some buggy programs depend on this. */
|
||||||
if (seconds == 0)
|
if (__builtin_expect (seconds == 0, 0))
|
||||||
{
|
{
|
||||||
#ifdef CANCELLATION_P
|
#ifdef CANCELLATION_P
|
||||||
CANCELLATION_P (THREAD_SELF);
|
CANCELLATION_P (THREAD_SELF);
|
||||||
|
Reference in New Issue
Block a user