make lwp_unstop look like proc_unstop. If p->p_xstat is set, then make it

runnable so that it can receive the signal.
This commit is contained in:
christos 2011-08-31 16:04:39 +00:00
parent a9b219be41
commit 8cdc46a4a4
1 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_lwp.c,v 1.162 2011/08/07 21:13:05 rmind Exp $ */
/* $NetBSD: kern_lwp.c,v 1.163 2011/08/31 16:04:39 christos Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@ -211,7 +211,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.162 2011/08/07 21:13:05 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.163 2011/08/31 16:04:39 christos Exp $");
#include "opt_ddb.h"
#include "opt_lockdebug.h"
@ -471,6 +471,9 @@ lwp_unstop(struct lwp *l)
if (l->l_wchan == NULL) {
/* setrunnable() will release the lock. */
setrunnable(l);
} else if (p->p_xstat && (l->l_flag & LW_SINTR) != 0) {
/* setrunnable() so we can receive the signal */
setrunnable(l);
} else {
l->l_stat = LSSLEEP;
p->p_nrlwps++;