aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-05-21 21:42:32 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-05-21 23:52:30 -0400
commit68f3f16d9ad0f1e28ab3fd0001ab5798c41f15a3 (patch)
treefd023109413f5eb28b364663fdf4bf2eabca47d4 /arch/mn10300/kernel
parentbf67f3a5c456a18f2e8d062f7e88506ef2cd9837 (diff)
new helper: sigsuspend()
guts of saved_sigmask-based sigsuspend/rt_sigsuspend. Takes kernel sigset_t *. Open-coded instances replaced with calling it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/mn10300/kernel')
-rw-r--r--arch/mn10300/kernel/signal.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/mn10300/kernel/signal.c b/arch/mn10300/kernel/signal.c
index 690f4e9507d7..50eb94a05826 100644
--- a/arch/mn10300/kernel/signal.c
+++ b/arch/mn10300/kernel/signal.c
@@ -38,17 +38,9 @@
38 */ 38 */
39asmlinkage long sys_sigsuspend(int history0, int history1, old_sigset_t mask) 39asmlinkage long sys_sigsuspend(int history0, int history1, old_sigset_t mask)
40{ 40{
41 mask &= _BLOCKABLE; 41 sigset_t blocked;
42 spin_lock_irq(&current->sighand->siglock); 42 siginitset(&blocked, mask);
43 current->saved_sigmask = current->blocked; 43 return sigsuspend(&blocked);
44 siginitset(&current->blocked, mask);
45 recalc_sigpending();
46 spin_unlock_irq(&current->sighand->siglock);
47
48 current->state = TASK_INTERRUPTIBLE;
49 schedule();
50 set_thread_flag(TIF_RESTORE_SIGMASK);
51 return -ERESTARTNOHAND;
52} 44}
53 45
54/* 46/*