/* atomically swap in the new signal mask, and wait for a signal.  */
asmlinkage long sys_sigsuspend(int history0, int history1, old_sigset_t mask)
/* atomically swap in the new signal mask, and wait for a signal.  */
asmlinkage long sys_sigsuspend(int history0, int history1, old_sigset_t mask)
{
	mask &= _BLOCKABLE;
	spin_lock_irq(&current->sighand->siglock);
	current->saved_sigmask = current->blocked;
	siginitset(&current->blocked, mask);
	recalc_sigpending();
	spin_unlock_irq(&current->sighand->siglock);
	current->state = TASK_INTERRUPTIBLE;
	schedule();
	set_thread_flag(TIF_RESTORE_SIGMASK);
	return -ERESTARTNOHAND;
}