aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/signal_64.c
diff options
context:
space:
mode:
authorGravatar Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> 2008-11-21 17:38:25 -0800
committerGravatar Ingo Molnar <mingo@elte.hu> 2008-11-23 10:50:58 +0100
commit666ac7be049ec290625e65d5922ff59f7bdec527 (patch)
tree68b156d87aa32a55e231bdb547d616e8d7d76f23 /arch/x86/kernel/signal_64.c
parentx86: signal: cosmetic unification of including headers (diff)
downloadlinux-666ac7be049ec290625e65d5922ff59f7bdec527.tar.gz
linux-666ac7be049ec290625e65d5922ff59f7bdec527.tar.bz2
linux-666ac7be049ec290625e65d5922ff59f7bdec527.zip
x86: signal: cosmetic unification of sys_sigaltstack()
Impact: cleanup Add #ifdef directive for unification. Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/signal_64.c')
-rw-r--r--arch/x86/kernel/signal_64.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c
index c52244ac19fc..b6e4fe03a36b 100644
--- a/arch/x86/kernel/signal_64.c
+++ b/arch/x86/kernel/signal_64.c
@@ -50,12 +50,27 @@
# define FIX_EFLAGS __FIX_EFLAGS
#endif
+#ifdef CONFIG_X86_32
+asmlinkage int sys_sigaltstack(unsigned long bx)
+{
+ /*
+ * This is needed to make gcc realize it doesn't own the
+ * "struct pt_regs"
+ */
+ struct pt_regs *regs = (struct pt_regs *)&bx;
+ const stack_t __user *uss = (const stack_t __user *)bx;
+ stack_t __user *uoss = (stack_t __user *)regs->cx;
+
+ return do_sigaltstack(uss, uoss, regs->sp);
+}
+#else /* !CONFIG_X86_32 */
asmlinkage long
sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
struct pt_regs *regs)
{
return do_sigaltstack(uss, uoss, regs->sp);
}
+#endif /* CONFIG_X86_32 */
#define COPY(x) { \
err |= __get_user(regs->x, &sc->x); \