aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v10
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/cris/arch-v10
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/cris/arch-v10')
-rw-r--r--arch/cris/arch-v10/kernel/signal.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/cris/arch-v10/kernel/signal.c b/arch/cris/arch-v10/kernel/signal.c
index 06885e94e455..09a4cf4eb08a 100644
--- a/arch/cris/arch-v10/kernel/signal.c
+++ b/arch/cris/arch-v10/kernel/signal.c
@@ -417,8 +417,9 @@ give_sigsegv:
417 417
418static inline int handle_signal(int canrestart, unsigned long sig, 418static inline int handle_signal(int canrestart, unsigned long sig,
419 siginfo_t *info, struct k_sigaction *ka, 419 siginfo_t *info, struct k_sigaction *ka,
420 sigset_t *oldset, struct pt_regs *regs) 420 struct pt_regs *regs)
421{ 421{
422 sigset_t *oldset = sigmask_to_save();
422 int ret; 423 int ret;
423 424
424 /* Are we from a system call? */ 425 /* Are we from a system call? */
@@ -478,7 +479,6 @@ void do_signal(int canrestart, struct pt_regs *regs)
478 siginfo_t info; 479 siginfo_t info;
479 int signr; 480 int signr;
480 struct k_sigaction ka; 481 struct k_sigaction ka;
481 sigset_t *oldset;
482 482
483 /* 483 /*
484 * We want the common case to go fast, which 484 * We want the common case to go fast, which
@@ -489,16 +489,11 @@ void do_signal(int canrestart, struct pt_regs *regs)
489 if (!user_mode(regs)) 489 if (!user_mode(regs))
490 return; 490 return;
491 491
492 if (test_thread_flag(TIF_RESTORE_SIGMASK))
493 oldset = &current->saved_sigmask;
494 else
495 oldset = &current->blocked;
496
497 signr = get_signal_to_deliver(&info, &ka, regs, NULL); 492 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
498 if (signr > 0) { 493 if (signr > 0) {
499 /* Whee! Actually deliver the signal. */ 494 /* Whee! Actually deliver the signal. */
500 if (handle_signal(canrestart, signr, &info, &ka, 495 if (handle_signal(canrestart, signr, &info, &ka,
501 oldset, regs)) { 496 regs)) {
502 /* a signal was successfully delivered; the saved 497 /* a signal was successfully delivered; the saved
503 * sigmask will have been stored in the signal frame, 498 * sigmask will have been stored in the signal frame,
504 * and will be restored by sigreturn, so we can simply 499 * and will be restored by sigreturn, so we can simply