aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/signal.c
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/x86/kernel/signal.c
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/x86/kernel/signal.c')
-rw-r--r--arch/x86/kernel/signal.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index 115eac431483..b68ccadd2ff4 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -478,18 +478,8 @@ asmlinkage int
478sys_sigsuspend(int history0, int history1, old_sigset_t mask) 478sys_sigsuspend(int history0, int history1, old_sigset_t mask)
479{ 479{
480 sigset_t blocked; 480 sigset_t blocked;
481
482 current->saved_sigmask = current->blocked;
483
484 mask &= _BLOCKABLE;
485 siginitset(&blocked, mask); 481 siginitset(&blocked, mask);
486 set_current_blocked(&blocked); 482 return sigsuspend(&blocked);
487
488 current->state = TASK_INTERRUPTIBLE;
489 schedule();
490
491 set_restore_sigmask();
492 return -ERESTARTNOHAND;
493} 483}
494 484
495asmlinkage int 485asmlinkage int