diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-21 21:42:32 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-21 23:52:30 -0400 |
commit | 68f3f16d9ad0f1e28ab3fd0001ab5798c41f15a3 (patch) | |
tree | fd023109413f5eb28b364663fdf4bf2eabca47d4 /arch/sh/kernel | |
parent | bf67f3a5c456a18f2e8d062f7e88506ef2cd9837 (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/sh/kernel')
-rw-r--r-- | arch/sh/kernel/signal_32.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c index 5901fba3176e..46c9f9b00b14 100644 --- a/arch/sh/kernel/signal_32.c +++ b/arch/sh/kernel/signal_32.c | |||
@@ -58,18 +58,8 @@ sys_sigsuspend(old_sigset_t mask, | |||
58 | struct pt_regs __regs) | 58 | struct pt_regs __regs) |
59 | { | 59 | { |
60 | sigset_t blocked; | 60 | sigset_t blocked; |
61 | |||
62 | current->saved_sigmask = current->blocked; | ||
63 | |||
64 | mask &= _BLOCKABLE; | ||
65 | siginitset(&blocked, mask); | 61 | siginitset(&blocked, mask); |
66 | set_current_blocked(&blocked); | 62 | return sigsuspend(&blocked); |
67 | |||
68 | current->state = TASK_INTERRUPTIBLE; | ||
69 | schedule(); | ||
70 | set_restore_sigmask(); | ||
71 | |||
72 | return -ERESTARTNOHAND; | ||
73 | } | 63 | } |
74 | 64 | ||
75 | asmlinkage int | 65 | asmlinkage int |