diff options
author | Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> | 2008-11-21 20:38:25 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-23 04:50:58 -0500 |
commit | 666ac7be049ec290625e65d5922ff59f7bdec527 (patch) | |
tree | 68b156d87aa32a55e231bdb547d616e8d7d76f23 /arch/x86/kernel/signal_64.c | |
parent | 5c9b3a0c7b8be3cdef3d7418f0a49127e7cdc998 (diff) |
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.c | 15 |
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 @@ | |||
50 | # define FIX_EFLAGS __FIX_EFLAGS | 50 | # define FIX_EFLAGS __FIX_EFLAGS |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | #ifdef CONFIG_X86_32 | ||
54 | asmlinkage int sys_sigaltstack(unsigned long bx) | ||
55 | { | ||
56 | /* | ||
57 | * This is needed to make gcc realize it doesn't own the | ||
58 | * "struct pt_regs" | ||
59 | */ | ||
60 | struct pt_regs *regs = (struct pt_regs *)&bx; | ||
61 | const stack_t __user *uss = (const stack_t __user *)bx; | ||
62 | stack_t __user *uoss = (stack_t __user *)regs->cx; | ||
63 | |||
64 | return do_sigaltstack(uss, uoss, regs->sp); | ||
65 | } | ||
66 | #else /* !CONFIG_X86_32 */ | ||
53 | asmlinkage long | 67 | asmlinkage long |
54 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | 68 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, |
55 | struct pt_regs *regs) | 69 | struct pt_regs *regs) |
56 | { | 70 | { |
57 | return do_sigaltstack(uss, uoss, regs->sp); | 71 | return do_sigaltstack(uss, uoss, regs->sp); |
58 | } | 72 | } |
73 | #endif /* CONFIG_X86_32 */ | ||
59 | 74 | ||
60 | #define COPY(x) { \ | 75 | #define COPY(x) { \ |
61 | err |= __get_user(regs->x, &sc->x); \ | 76 | err |= __get_user(regs->x, &sc->x); \ |