aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/kernel/signal.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-05-02 09:59:21 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-06-01 12:58:48 -0400
commitb7f9a11a6cf1ea9ee6be3eb2b90d91327a09ad14 (patch)
tree7d5a5f469aea8ac2b3e1ab41e05a6abafcb2b694 /arch/xtensa/kernel/signal.c
parent51a7b448d4134e3e8eec633435e3e8faee14a828 (diff)
new helper: sigmask_to_save()
replace boilerplate "should we use ->saved_sigmask or ->blocked?" with calls of obvious inlined helper... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/xtensa/kernel/signal.c')
-rw-r--r--arch/xtensa/kernel/signal.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c
index 8c4e751e3b83..e4b06e2d4eb9 100644
--- a/arch/xtensa/kernel/signal.c
+++ b/arch/xtensa/kernel/signal.c
@@ -452,16 +452,10 @@ static void do_signal(struct pt_regs *regs)
452 siginfo_t info; 452 siginfo_t info;
453 int signr; 453 int signr;
454 struct k_sigaction ka; 454 struct k_sigaction ka;
455 sigset_t oldset;
456 455
457 if (try_to_freeze()) 456 if (try_to_freeze())
458 goto no_signal; 457 goto no_signal;
459 458
460 if (test_thread_flag(TIF_RESTORE_SIGMASK))
461 oldset = &current->saved_sigmask;
462 else
463 oldset = &current->blocked;
464
465 task_pt_regs(current)->icountlevel = 0; 459 task_pt_regs(current)->icountlevel = 0;
466 460
467 signr = get_signal_to_deliver(&info, &ka, regs, NULL); 461 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
@@ -501,7 +495,7 @@ static void do_signal(struct pt_regs *regs)
501 495
502 /* Whee! Actually deliver the signal. */ 496 /* Whee! Actually deliver the signal. */
503 /* Set up the stack frame */ 497 /* Set up the stack frame */
504 ret = setup_frame(signr, &ka, &info, oldset, regs); 498 ret = setup_frame(signr, &ka, &info, sigmask_to_save(), regs);
505 if (ret) 499 if (ret)
506 return; 500 return;
507 501