mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
* sysdeps/unix/sysv/linux/sigwaitinfo.c (do_sigwaitinfo): Fold SI_TKILL code into SI_USER. * sysdeps/unix/sysv/linux/sigtimedwait.c (do_sigtimedwait): Likewise.
This commit is contained in:
@ -1,5 +1,9 @@
|
|||||||
2003-05-16 Ulrich Drepper <drepper@redhat.com>
|
2003-05-16 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/sigwaitinfo.c (do_sigwaitinfo): Fold
|
||||||
|
SI_TKILL code into SI_USER.
|
||||||
|
* sysdeps/unix/sysv/linux/sigtimedwait.c (do_sigtimedwait): Likewise.
|
||||||
|
|
||||||
* sysdeps/posix/sigpause.c (do_sigpause): Use sigdelset after all.
|
* sysdeps/posix/sigpause.c (do_sigpause): Use sigdelset after all.
|
||||||
|
|
||||||
2003-05-15 Jakub Jelinek <jakub@redhat.com>
|
2003-05-15 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
@ -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
|
||||||
@ -28,6 +28,26 @@ extern int __syscall_rt_sigtimedwait (const sigset_t *__unbounded, siginfo_t *__
|
|||||||
const struct timespec *__unbounded, size_t);
|
const struct timespec *__unbounded, size_t);
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
do_sigtimedwait (const sigset_t *set, siginfo_t *info,
|
||||||
|
const struct timespec *timeout)
|
||||||
|
{
|
||||||
|
/* 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, CHECK_SIGSET (set),
|
||||||
|
CHECK_1 (info), timeout, _NSIG / 8);
|
||||||
|
|
||||||
|
/* The kernel generates a SI_TKILL code in si_code in case tkill is
|
||||||
|
used. tkill is transparently used in raise(). Since having
|
||||||
|
SI_TKILL as a code is useful in general we fold the results
|
||||||
|
here. */
|
||||||
|
if (result != -1 && info != NULL && info->si_code == SI_TKILL)
|
||||||
|
info->si_code = SI_USER;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Return any pending signal or wait for one for the given time. */
|
/* Return any pending signal or wait for one for the given time. */
|
||||||
int
|
int
|
||||||
__sigtimedwait (set, info, timeout)
|
__sigtimedwait (set, info, timeout)
|
||||||
@ -36,17 +56,13 @@ __sigtimedwait (set, info, timeout)
|
|||||||
const struct timespec *timeout;
|
const struct timespec *timeout;
|
||||||
{
|
{
|
||||||
if (SINGLE_THREAD_P)
|
if (SINGLE_THREAD_P)
|
||||||
/* XXX The size argument hopefully will have to be changed to the
|
return do_sigtimedwait (set, info, timeout);
|
||||||
real size of the user-level sigset_t. */
|
|
||||||
return INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
|
|
||||||
CHECK_1 (info), timeout, _NSIG / 8);
|
|
||||||
|
|
||||||
int oldtype = LIBC_CANCEL_ASYNC ();
|
int oldtype = LIBC_CANCEL_ASYNC ();
|
||||||
|
|
||||||
/* 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 = do_sigtimedwait (set, info, timeout);
|
||||||
CHECK_1 (info), timeout, _NSIG / 8);
|
|
||||||
|
|
||||||
LIBC_CANCEL_RESET (oldtype);
|
LIBC_CANCEL_RESET (oldtype);
|
||||||
|
|
||||||
|
@ -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
|
||||||
@ -30,6 +30,25 @@ extern int __syscall_rt_sigtimedwait (const sigset_t *__unbounded, siginfo_t *__
|
|||||||
const struct timespec *__unbounded, size_t);
|
const struct timespec *__unbounded, size_t);
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
do_sigwaitinfo (const sigset_t *set, siginfo_t *info)
|
||||||
|
{
|
||||||
|
/* 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, CHECK_SIGSET (set),
|
||||||
|
CHECK_1 (info), NULL, _NSIG / 8);
|
||||||
|
|
||||||
|
/* The kernel generates a SI_TKILL code in si_code in case tkill is
|
||||||
|
used. tkill is transparently used in raise(). Since having
|
||||||
|
SI_TKILL as a code is useful in general we fold the results
|
||||||
|
here. */
|
||||||
|
if (result != -1 && info != NULL && info->si_code == SI_TKILL)
|
||||||
|
info->si_code = SI_USER;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Return any pending signal or wait for one for the given time. */
|
/* Return any pending signal or wait for one for the given time. */
|
||||||
int
|
int
|
||||||
__sigwaitinfo (set, info)
|
__sigwaitinfo (set, info)
|
||||||
@ -37,17 +56,13 @@ __sigwaitinfo (set, info)
|
|||||||
siginfo_t *info;
|
siginfo_t *info;
|
||||||
{
|
{
|
||||||
if (SINGLE_THREAD_P)
|
if (SINGLE_THREAD_P)
|
||||||
/* XXX The size argument hopefully will have to be changed to the
|
return do_sigwaitinfo (set, info);
|
||||||
real size of the user-level sigset_t. */
|
|
||||||
return INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
|
|
||||||
CHECK_1 (info), NULL, _NSIG / 8);
|
|
||||||
|
|
||||||
int oldtype = LIBC_CANCEL_ASYNC ();
|
int oldtype = LIBC_CANCEL_ASYNC ();
|
||||||
|
|
||||||
/* 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 = do_sigwaitinfo (set, info);
|
||||||
CHECK_1 (info), NULL, _NSIG / 8);
|
|
||||||
|
|
||||||
LIBC_CANCEL_RESET (oldtype);
|
LIBC_CANCEL_RESET (oldtype);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user