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/frv | |
parent | bf67f3a5c456a18f2e8d062f7e88506ef2cd9837 (diff) | |
download | linux-68f3f16d9ad0f1e28ab3fd0001ab5798c41f15a3.tar.gz linux-68f3f16d9ad0f1e28ab3fd0001ab5798c41f15a3.tar.bz2 linux-68f3f16d9ad0f1e28ab3fd0001ab5798c41f15a3.zip |
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/frv')
-rw-r--r-- | arch/frv/kernel/signal.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c index bab01298b58e..df957c7ba387 100644 --- a/arch/frv/kernel/signal.c +++ b/arch/frv/kernel/signal.c @@ -40,17 +40,9 @@ struct fdpic_func_descriptor { */ asmlinkage int sys_sigsuspend(int history0, int history1, old_sigset_t mask) { - mask &= _BLOCKABLE; - spin_lock_irq(¤t->sighand->siglock); - current->saved_sigmask = current->blocked; - siginitset(¤t->blocked, mask); - recalc_sigpending(); - spin_unlock_irq(¤t->sighand->siglock); - - current->state = TASK_INTERRUPTIBLE; - schedule(); - set_thread_flag(TIF_RESTORE_SIGMASK); - return -ERESTARTNOHAND; + sigset_t blocked; + siginitset(&blocked, mask); + return sigsuspend(&blocked); } asmlinkage int sys_sigaction(int sig, |