Revert previous for a better fix.

This commit is contained in:
mlelstv 2018-11-28 19:36:43 +00:00
parent d1b4960443
commit d7158461a0
1 changed files with 3 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_synch.c,v 1.319 2018/11/28 09:44:49 mlelstv Exp $ */
/* $NetBSD: kern_synch.c,v 1.320 2018/11/28 19:36:43 mlelstv Exp $ */
/*-
* Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009
@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.319 2018/11/28 09:44:49 mlelstv Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.320 2018/11/28 19:36:43 mlelstv Exp $");
#include "opt_kstack.h"
#include "opt_dtrace.h"
@ -292,12 +292,7 @@ preempt(void)
KASSERT(l->l_stat == LSONPROC);
l->l_kpriority = false;
l->l_nivcsw++;
if (mi_switch(l) == 0) {
/* we didn't switch */
lwp_lock(l);
l->l_nivcsw--;
lwp_unlock(l);
}
(void)mi_switch(l);
KERNEL_LOCK(l->l_biglocks, l);
}