mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 06:40:09 +00:00
43a45c2d82
Commit b4a5d26d88
(linux: Consolidate sigaction implementation) added
a wrong kernel_sigaction definition for m68k, meant for __NR_sigaction
instead of __NR_rt_sigaction as used on generic Linux sigaction
implementation. This patch fixes it by using the Linux generic
definition meant for the RT kernel ABI.
Checked the signal tests on emulated m68-linux-gnu (Aranym). It fixes
the faulty signal/tst-sigaction and man works as expected.
Adhemerval Zanella <adhemerval.zanella@linaro.org>
James Clarke <jrtc27@jrtc27.com>
[BZ #23960]
* sysdeps/unix/sysv/linux/kernel_sigaction.h (HAS_SA_RESTORER):
Define if SA_RESTORER is defined.
(kernel_sigaction): Define sa_restorer if HAS_SA_RESTORER is defined.
(SET_SA_RESTORER, RESET_SA_RESTORER): Define iff the macro are not
already defined.
* sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h (SA_RESTORER,
kernel_sigaction, SET_SA_RESTORER, RESET_SA_RESTORER): Remove
definitions.
(HAS_SA_RESTORER): Define.
* sysdeps/unix/sysv/linux/sparc/kernel_sigaction.h (SA_RESTORER,
SET_SA_RESTORER, RESET_SA_RESTORER): Remove definition.
(HAS_SA_RESTORER): Define.
* sysdeps/unix/sysv/linux/nios2/kernel_sigaction.h: Include generic
kernel_sigaction after define SET_SA_RESTORER and RESET_SA_RESTORER.
* sysdeps/unix/sysv/linux/powerpc/kernel_sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.
29 lines
629 B
C
29 lines
629 B
C
#ifndef _KERNEL_SIGACTION_H
|
|
# define _KERNEL_SIGACTION_H
|
|
|
|
#ifdef SA_RESTORER
|
|
# define HAS_SA_RESTORER 1
|
|
#endif
|
|
|
|
/* This is the sigaction structure from the Linux 3.2 kernel. */
|
|
struct kernel_sigaction
|
|
{
|
|
__sighandler_t k_sa_handler;
|
|
unsigned long sa_flags;
|
|
#ifdef HAS_SA_RESTORER
|
|
void (*sa_restorer) (void);
|
|
#endif
|
|
/* glibc sigset is larger than kernel expected one, however sigaction
|
|
passes the kernel expected size on rt_sigaction syscall. */
|
|
sigset_t sa_mask;
|
|
};
|
|
|
|
#ifndef SET_SA_RESTORER
|
|
# define SET_SA_RESTORER(kact, act)
|
|
#endif
|
|
#ifndef RESET_SA_RESTORER
|
|
# define RESET_SA_RESTORER(act, kact)
|
|
#endif
|
|
|
|
#endif
|