diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-02 09:59:21 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-01 12:58:48 -0400 |
commit | b7f9a11a6cf1ea9ee6be3eb2b90d91327a09ad14 (patch) | |
tree | 7d5a5f469aea8ac2b3e1ab41e05a6abafcb2b694 /arch/h8300 | |
parent | 51a7b448d4134e3e8eec633435e3e8faee14a828 (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/h8300')
-rw-r--r-- | arch/h8300/kernel/signal.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/h8300/kernel/signal.c b/arch/h8300/kernel/signal.c index 63623dabab32..d4d2f72672ad 100644 --- a/arch/h8300/kernel/signal.c +++ b/arch/h8300/kernel/signal.c | |||
@@ -412,8 +412,9 @@ give_sigsegv: | |||
412 | */ | 412 | */ |
413 | static void | 413 | static void |
414 | handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, | 414 | handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, |
415 | sigset_t *oldset, struct pt_regs * regs) | 415 | struct pt_regs * regs) |
416 | { | 416 | { |
417 | sigset_t *oldset = sigmask_to_save(); | ||
417 | int ret; | 418 | int ret; |
418 | /* are we from a system call? */ | 419 | /* are we from a system call? */ |
419 | if (regs->orig_er0 >= 0) { | 420 | if (regs->orig_er0 >= 0) { |
@@ -457,7 +458,6 @@ statis void do_signal(struct pt_regs *regs) | |||
457 | siginfo_t info; | 458 | siginfo_t info; |
458 | int signr; | 459 | int signr; |
459 | struct k_sigaction ka; | 460 | struct k_sigaction ka; |
460 | sigset_t *oldset; | ||
461 | 461 | ||
462 | /* | 462 | /* |
463 | * We want the common case to go fast, which | 463 | * We want the common case to go fast, which |
@@ -473,15 +473,10 @@ statis void do_signal(struct pt_regs *regs) | |||
473 | 473 | ||
474 | current->thread.esp0 = (unsigned long) regs; | 474 | current->thread.esp0 = (unsigned long) regs; |
475 | 475 | ||
476 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
477 | oldset = ¤t->saved_sigmask; | ||
478 | else | ||
479 | oldset = ¤t->blocked; | ||
480 | |||
481 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 476 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
482 | if (signr > 0) { | 477 | if (signr > 0) { |
483 | /* Whee! Actually deliver the signal. */ | 478 | /* Whee! Actually deliver the signal. */ |
484 | handle_signal(signr, &info, &ka, oldset, regs); | 479 | handle_signal(signr, &info, &ka, regs); |
485 | return; | 480 | return; |
486 | } | 481 | } |
487 | no_signal: | 482 | no_signal: |