aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/signal_32.c
diff options
context:
space:
mode:
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>2008-09-24 22:10:29 -0400
committerIngo Molnar <mingo@elte.hu>2008-09-25 04:11:38 -0400
commit8d8c13bdb53977319593d9efc4971a4cacc8bd03 (patch)
tree8d93199db30a078bbdfc5b1b49dd434488fe860c /arch/x86/kernel/signal_32.c
parent86d3237cd1a09136b4fb3a1d73d3c3fd6331cb14 (diff)
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>
Diffstat (limited to 'arch/x86/kernel/signal_32.c')
-rw-r--r--arch/x86/kernel/signal_32.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c
index bb05917f232c..b1bc90f19b9a 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,
482/* 482/*
483 * OK, we're invoking a handler: 483 * OK, we're invoking a handler:
484 */ 484 */
485static int signr_convert(int sig)
486{
487 struct thread_info *info = current_thread_info();
488
489 if (info->exec_domain && info->exec_domain->signal_invmap && sig < 32)
490 return info->exec_domain->signal_invmap[sig];
491 return sig;
492}
493
485static int 494static int
486setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, 495setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
487 sigset_t *set, struct pt_regs *regs) 496 sigset_t *set, struct pt_regs *regs)
488{ 497{
498 int usig = signr_convert(sig);
489 int ret; 499 int ret;
490 int usig;
491
492 usig = current_thread_info()->exec_domain
493 && current_thread_info()->exec_domain->signal_invmap
494 && sig < 32
495 ? current_thread_info()->exec_domain->signal_invmap[sig]
496 : sig;
497 500
498 /* Set up the stack frame */ 501 /* Set up the stack frame */
499 if (ka->sa.sa_flags & SA_SIGINFO) 502 if (ka->sa.sa_flags & SA_SIGINFO)