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/frv | |
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/frv')
-rw-r--r-- | arch/frv/kernel/signal.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c index 16351cc8c36c..22efe8d25038 100644 --- a/arch/frv/kernel/signal.c +++ b/arch/frv/kernel/signal.c | |||
@@ -427,8 +427,9 @@ give_sigsegv: | |||
427 | * OK, we're invoking a handler | 427 | * OK, we're invoking a handler |
428 | */ | 428 | */ |
429 | static int handle_signal(unsigned long sig, siginfo_t *info, | 429 | static int handle_signal(unsigned long sig, siginfo_t *info, |
430 | struct k_sigaction *ka, sigset_t *oldset) | 430 | struct k_sigaction *ka) |
431 | { | 431 | { |
432 | sigset_t *oldset = sigmask_to_save(); | ||
432 | int ret; | 433 | int ret; |
433 | 434 | ||
434 | /* Are we from a system call? */ | 435 | /* Are we from a system call? */ |
@@ -492,14 +493,9 @@ static void do_signal(void) | |||
492 | if (try_to_freeze()) | 493 | if (try_to_freeze()) |
493 | goto no_signal; | 494 | goto no_signal; |
494 | 495 | ||
495 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
496 | oldset = ¤t->saved_sigmask; | ||
497 | else | ||
498 | oldset = ¤t->blocked; | ||
499 | |||
500 | signr = get_signal_to_deliver(&info, &ka, __frame, NULL); | 496 | signr = get_signal_to_deliver(&info, &ka, __frame, NULL); |
501 | if (signr > 0) { | 497 | if (signr > 0) { |
502 | if (handle_signal(signr, &info, &ka, oldset) == 0) { | 498 | if (handle_signal(signr, &info, &ka) == 0) { |
503 | /* a signal was successfully delivered; the saved | 499 | /* a signal was successfully delivered; the saved |
504 | * sigmask will have been stored in the signal frame, | 500 | * sigmask will have been stored in the signal frame, |
505 | * and will be restored by sigreturn, so we can simply | 501 | * and will be restored by sigreturn, so we can simply |