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/mn10300/kernel | |
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/mn10300/kernel')
-rw-r--r-- | arch/mn10300/kernel/signal.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/mn10300/kernel/signal.c b/arch/mn10300/kernel/signal.c index b7994c38eacc..26a1d98c62a1 100644 --- a/arch/mn10300/kernel/signal.c +++ b/arch/mn10300/kernel/signal.c | |||
@@ -430,8 +430,9 @@ static inline void stepback(struct pt_regs *regs) | |||
430 | */ | 430 | */ |
431 | static int handle_signal(int sig, | 431 | static int handle_signal(int sig, |
432 | siginfo_t *info, struct k_sigaction *ka, | 432 | siginfo_t *info, struct k_sigaction *ka, |
433 | sigset_t *oldset, struct pt_regs *regs) | 433 | struct pt_regs *regs) |
434 | { | 434 | { |
435 | sigset_t *oldset = sigmask_to_save(); | ||
435 | int ret; | 436 | int ret; |
436 | 437 | ||
437 | /* Are we from a system call? */ | 438 | /* Are we from a system call? */ |
@@ -475,7 +476,6 @@ static void do_signal(struct pt_regs *regs) | |||
475 | { | 476 | { |
476 | struct k_sigaction ka; | 477 | struct k_sigaction ka; |
477 | siginfo_t info; | 478 | siginfo_t info; |
478 | sigset_t *oldset; | ||
479 | int signr; | 479 | int signr; |
480 | 480 | ||
481 | /* we want the common case to go fast, which is why we may in certain | 481 | /* we want the common case to go fast, which is why we may in certain |
@@ -483,14 +483,9 @@ static void do_signal(struct pt_regs *regs) | |||
483 | if (!user_mode(regs)) | 483 | if (!user_mode(regs)) |
484 | return; | 484 | return; |
485 | 485 | ||
486 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
487 | oldset = ¤t->saved_sigmask; | ||
488 | else | ||
489 | oldset = ¤t->blocked; | ||
490 | |||
491 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 486 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
492 | if (signr > 0) { | 487 | if (signr > 0) { |
493 | if (handle_signal(signr, &info, &ka, oldset, regs) == 0) { | 488 | if (handle_signal(signr, &info, &ka, regs) == 0) { |
494 | /* a signal was successfully delivered; the saved | 489 | /* a signal was successfully delivered; the saved |
495 | * sigmask will have been stored in the signal frame, | 490 | * sigmask will have been stored in the signal frame, |
496 | * and will be restored by sigreturn, so we can simply | 491 | * and will be restored by sigreturn, so we can simply |