From d7158461a055ae24ebb0c9db692a94a2956d154d Mon Sep 17 00:00:00 2001 From: mlelstv Date: Wed, 28 Nov 2018 19:36:43 +0000 Subject: [PATCH] Revert previous for a better fix. --- sys/kern/kern_synch.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index bfdbb3b0c2d2..6ad0461e030c 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -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 -__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); }