aboutsummaryrefslogtreecommitdiffstats
path: root/arch/unicore32
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/unicore32
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/unicore32')
-rw-r--r--arch/unicore32/kernel/signal.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/arch/unicore32/kernel/signal.c b/arch/unicore32/kernel/signal.c
index 65a5ed3b6f2a..bf23194dc74d 100644
--- a/arch/unicore32/kernel/signal.c
+++ b/arch/unicore32/kernel/signal.c
@@ -313,12 +313,11 @@ static inline void setup_syscall_restart(struct pt_regs *regs)
313 * OK, we're invoking a handler 313 * OK, we're invoking a handler
314 */ 314 */
315static int handle_signal(unsigned long sig, struct k_sigaction *ka, 315static int handle_signal(unsigned long sig, struct k_sigaction *ka,
316 siginfo_t *info, sigset_t *oldset, 316 siginfo_t *info, struct pt_regs *regs, int syscall)
317 struct pt_regs *regs, int syscall)
318{ 317{
319 struct thread_info *thread = current_thread_info(); 318 struct thread_info *thread = current_thread_info();
320 struct task_struct *tsk = current; 319 struct task_struct *tsk = current;
321 sigset_t blocked; 320 sigset_t *oldset = sigmask_to_save();
322 int usig = sig; 321 int usig = sig;
323 int ret; 322 int ret;
324 323
@@ -404,13 +403,7 @@ static void do_signal(struct pt_regs *regs, int syscall)
404 403
405 signr = get_signal_to_deliver(&info, &ka, regs, NULL); 404 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
406 if (signr > 0) { 405 if (signr > 0) {
407 sigset_t *oldset; 406 if (handle_signal(signr, &ka, &info, regs, syscall)
408
409 if (test_thread_flag(TIF_RESTORE_SIGMASK))
410 oldset = &current->saved_sigmask;
411 else
412 oldset = &current->blocked;
413 if (handle_signal(signr, &ka, &info, oldset, regs, syscall)
414 == 0) { 407 == 0) {
415 /* 408 /*
416 * A signal was successfully delivered; the saved 409 * A signal was successfully delivered; the saved