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/um/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/um/kernel')
-rw-r--r-- | arch/um/kernel/signal.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c index 6acf13c1740b..909e9b8d6612 100644 --- a/arch/um/kernel/signal.c +++ b/arch/um/kernel/signal.c @@ -23,9 +23,9 @@ EXPORT_SYMBOL(unblock_signals); * OK, we're invoking a handler */ static int handle_signal(struct pt_regs *regs, unsigned long signr, - struct k_sigaction *ka, siginfo_t *info, - sigset_t *oldset) + struct k_sigaction *ka, siginfo_t *info) { + sigset_t *oldset = sigmask_to_save(); unsigned long sp; int err; @@ -77,14 +77,9 @@ static int kern_do_signal(struct pt_regs *regs) int sig, handled_sig = 0; while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) { - sigset_t *oldset; - if (test_thread_flag(TIF_RESTORE_SIGMASK)) - oldset = ¤t->saved_sigmask; - else - oldset = ¤t->blocked; handled_sig = 1; /* Whee! Actually deliver the signal. */ - if (!handle_signal(regs, sig, &ka_copy, &info, oldset)) { + if (!handle_signal(regs, sig, &ka_copy, &info)) { /* * a signal was successfully delivered; the saved * sigmask will have been stored in the signal frame, |