aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/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/m68k/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/m68k/kernel')
-rw-r--r--arch/m68k/kernel/signal.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c
index 1747c7030a3..8186982fb32 100644
--- a/arch/m68k/kernel/signal.c
+++ b/arch/m68k/kernel/signal.c
@@ -230,18 +230,9 @@ static inline void push_cache(unsigned long vaddr)
230asmlinkage int 230asmlinkage int
231sys_sigsuspend(int unused0, int unused1, old_sigset_t mask) 231sys_sigsuspend(int unused0, int unused1, old_sigset_t mask)
232{ 232{
233 mask &= _BLOCKABLE; 233 sigset_t blocked;
234 spin_lock_irq(&current->sighand->siglock); 234 siginitset(&blocked, mask);
235 current->saved_sigmask = current->blocked; 235 return sigsuspend(&blocked);
236 siginitset(&current->blocked, mask);
237 recalc_sigpending();
238 spin_unlock_irq(&current->sighand->siglock);
239
240 current->state = TASK_INTERRUPTIBLE;
241 schedule();
242 set_restore_sigmask();
243
244 return -ERESTARTNOHAND;
245} 236}
246 237
247asmlinkage int 238asmlinkage int