curlwp appears to be set by all active copies of cpu_switchto - remove
the MI assignments and assert that it's set in mi_switch().
This commit is contained in:
parent
26aaa9cb2b
commit
e36f46b00e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_lwp.c,v 1.70 2007/09/06 23:58:56 ad Exp $ */
|
||||
/* $NetBSD: kern_lwp.c,v 1.71 2007/09/25 21:38:56 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001, 2006, 2007 The NetBSD Foundation, Inc.
|
||||
@ -205,7 +205,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.70 2007/09/06 23:58:56 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.71 2007/09/25 21:38:56 ad Exp $");
|
||||
|
||||
#include "opt_multiprocessor.h"
|
||||
#include "opt_lockdebug.h"
|
||||
@ -656,7 +656,6 @@ void
|
||||
lwp_startup(struct lwp *prev, struct lwp *new)
|
||||
{
|
||||
|
||||
curlwp = new;
|
||||
if (prev != NULL) {
|
||||
lwp_unlock(prev);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_synch.c,v 1.194 2007/08/06 11:48:23 yamt Exp $ */
|
||||
/* $NetBSD: kern_synch.c,v 1.195 2007/09/25 21:38:57 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2004, 2006, 2007 The NetBSD Foundation, Inc.
|
||||
@ -75,7 +75,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.194 2007/08/06 11:48:23 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.195 2007/09/25 21:38:57 ad Exp $");
|
||||
|
||||
#include "opt_kstack.h"
|
||||
#include "opt_lockdebug.h"
|
||||
@ -468,7 +468,6 @@ mi_switch(struct lwp *l)
|
||||
* .. we have switched away and are now back so we must
|
||||
* be the new curlwp. prevlwp is who we replaced.
|
||||
*/
|
||||
curlwp = l;
|
||||
if (prevlwp != NULL) {
|
||||
curcpu()->ci_mtx_oldspl = oldspl;
|
||||
lwp_unlock(prevlwp);
|
||||
@ -504,6 +503,7 @@ mi_switch(struct lwp *l)
|
||||
* schedstate_percpu pointer.
|
||||
*/
|
||||
SYSCALL_TIME_WAKEUP(l);
|
||||
KASSERT(curlwp == l);
|
||||
KDASSERT(l->l_cpu == curcpu());
|
||||
LOCKDEBUG_BARRIER(NULL, 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user