diff --git a/sys/rump/librump/rumpkern/signals.c b/sys/rump/librump/rumpkern/signals.c index 0953f5b0a018..fd7f1441f3b3 100644 --- a/sys/rump/librump/rumpkern/signals.c +++ b/sys/rump/librump/rumpkern/signals.c @@ -1,4 +1,4 @@ -/* $NetBSD: signals.c,v 1.8 2011/02/20 13:09:57 pooka Exp $ */ +/* $NetBSD: signals.c,v 1.9 2011/05/18 15:57:14 christos Exp $ */ /*- * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: signals.c,v 1.8 2011/02/20 13:09:57 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: signals.c,v 1.9 2011/05/18 15:57:14 christos Exp $"); #include #include @@ -276,3 +276,17 @@ siginit(struct proc *p) sigemptyset(&p->p_sigctx.ps_sigignore); sigemptyset(&p->p_sigpend.sp_set); } + +void +sigsuspendsetup(struct lwp *l, const sigset_t *ss) +{ + /* XXX: Partial copy of kernel code, remove and use the kernel code */ + struct proc *p = l->l_proc; + + mutex_enter(p->p_lock); + l->l_sigrestore = 1; + l->l_sigoldmask = l->l_sigmask; + l->l_sigmask = *ss; + sigminusset(&sigcantmask, &l->l_sigmask); + mutex_exit(p->p_lock); +}