diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2018-12-11 16:57:49 -0200 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2018-12-18 19:52:21 -0200 |
commit | 56b98bf1fb819b357318f39fccf2901d3c6b41ec (patch) | |
tree | 082401b5aca4cfd946f8ea9911780b1ab46bf32d /sysdeps/unix/sysv/linux/alpha/sigaction.c | |
parent | 43a45c2d829f164c1fb94d5f44afe326fae946e1 (diff) | |
download | glibc-56b98bf1fb819b357318f39fccf2901d3c6b41ec.tar.gz glibc-56b98bf1fb819b357318f39fccf2901d3c6b41ec.tar.xz glibc-56b98bf1fb819b357318f39fccf2901d3c6b41ec.zip |
alpha: Use Linux generic sigaction implementation
Alpha rt_sigaction syscall uses a slight different kernel ABI than generic one: arch/alpha/kernel/signal.c 90 SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act, 91 struct sigaction __user *, oact, 92 size_t, sigsetsize, void __user *, restorer) Similar as sparc, the syscall expects a restorer function. However different than sparc, alpha defines the restorer as the 5th argument (sparc defines as the 4th). This patch removes the arch-specific alpha sigaction implementation, adapt the Linux generic one to different restore placements (through STUB macro), and make alpha use the Linux generic kernel_sigaction definition. Checked on alpha-linux-gnu and x86_64-linux-gnu (for sanity). * sysdeps/unix/sysv/linux/alpha/Makefile: Update comment about __syscall_rt_sigaction. * sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h (kernel_sigaction): Use Linux generic defintion. (STUB): Define. (__syscall_rt_sigreturn, __syscall_sigreturn): Add prototype. * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S (__syscall_rt_sigaction): Remove implementation. (__syscall_sigreturn, __syscall_rt_sigreturn): Define as global and hidden. * sysdeps/unix/sysv/linux/alpha/sigaction.c: Remove file. * sysdeps/unix/sysv/linux/alpha/sysdep.h (INLINE_SYSCALL, INTERNAL_SYSCALL): Remove definitions. * sysdeps/unix/sysv/linux/sigaction.c: Define STUB to accept both the action and signal set size. * sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c (STUB): Redefine. * sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c (STUB): Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/alpha/sigaction.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/sigaction.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.c b/sysdeps/unix/sysv/linux/alpha/sigaction.c deleted file mode 100644 index 8051043587..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sigaction.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2003-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> -#include <sys/cdefs.h> -#include <stddef.h> - -/* - * In order to get the hidden arguments for rt_sigaction set up - * properly, we need to call the assembly version. Detect this in the - * INLINE_SYSCALL macro, and fail to expand inline in that case. - */ - -#undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) \ - (__NR_##name == __NR_rt_sigaction \ - ? __syscall_rt_sigaction(args) \ - : INLINE_SYSCALL1(name, nr, args)) - -struct kernel_sigaction; -extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *, - struct kernel_sigaction *, size_t); - -#include <sysdeps/unix/sysv/linux/sigaction.c> |