diff options
author | Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> | 2008-09-24 22:13:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-25 04:11:41 -0400 |
commit | 455edbc423db282bb64dec2d7c8968498ea8e619 (patch) | |
tree | 8d059f1a94128d17e56caa610738767b0251ba8a /arch/x86/kernel/signal_32.c | |
parent | b94fd69827b2104a2a4d9d0bc05a8e908a937ae8 (diff) |
x86: signal: introduce helper macro is_ia32
Introduce new macro is_ia32 for unification of setup_rt_frame().
No effect in binary, compiler will optimize.
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_32.c')
-rw-r--r-- | arch/x86/kernel/signal_32.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index b1bc90f19b9a..cf62f70cc2a6 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -491,6 +491,8 @@ static int signr_convert(int sig) | |||
491 | return sig; | 491 | return sig; |
492 | } | 492 | } |
493 | 493 | ||
494 | #define is_ia32 1 | ||
495 | |||
494 | static int | 496 | static int |
495 | setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | 497 | setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, |
496 | sigset_t *set, struct pt_regs *regs) | 498 | sigset_t *set, struct pt_regs *regs) |
@@ -499,10 +501,13 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
499 | int ret; | 501 | int ret; |
500 | 502 | ||
501 | /* Set up the stack frame */ | 503 | /* Set up the stack frame */ |
502 | if (ka->sa.sa_flags & SA_SIGINFO) | 504 | if (is_ia32) { |
503 | ret = __setup_rt_frame(usig, ka, info, set, regs); | 505 | if (ka->sa.sa_flags & SA_SIGINFO) |
504 | else | 506 | ret = __setup_rt_frame(usig, ka, info, set, regs); |
505 | ret = __setup_frame(usig, ka, set, regs); | 507 | else |
508 | ret = __setup_frame(usig, ka, set, regs); | ||
509 | } else | ||
510 | ret = __setup_rt_frame(sig, ka, info, set, regs); | ||
506 | 511 | ||
507 | if (ret) { | 512 | if (ret) { |
508 | force_sigsegv(sig, current); | 513 | force_sigsegv(sig, current); |