diff options
author | Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> | 2008-09-24 19:10:29 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-25 10:11:38 +0200 |
commit | 8d8c13bdb53977319593d9efc4971a4cacc8bd03 (patch) | |
tree | 8d93199db30a078bbdfc5b1b49dd434488fe860c | |
parent | 86d3237cd1a09136b4fb3a1d73d3c3fd6331cb14 (diff) | |
download | kernel_samsung_smdk4412-8d8c13bdb53977319593d9efc4971a4cacc8bd03.zip kernel_samsung_smdk4412-8d8c13bdb53977319593d9efc4971a4cacc8bd03.tar.gz kernel_samsung_smdk4412-8d8c13bdb53977319593d9efc4971a4cacc8bd03.tar.bz2 |
x86: signal_32.c: introduce signr_convert()
Introduce signr_convert().
This function will help unification of setup_rt_frame().
Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/signal_32.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index bb05917..b1bc90f 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c @@ -482,18 +482,21 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, /* * OK, we're invoking a handler: */ +static int signr_convert(int sig) +{ + struct thread_info *info = current_thread_info(); + + if (info->exec_domain && info->exec_domain->signal_invmap && sig < 32) + return info->exec_domain->signal_invmap[sig]; + return sig; +} + static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *set, struct pt_regs *regs) { + int usig = signr_convert(sig); int ret; - int usig; - - usig = current_thread_info()->exec_domain - && current_thread_info()->exec_domain->signal_invmap - && sig < 32 - ? current_thread_info()->exec_domain->signal_invmap[sig] - : sig; /* Set up the stack frame */ if (ka->sa.sa_flags & SA_SIGINFO) |