Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Inverted test.



details:   https://anonhg.NetBSD.org/src/rev/998dc26442f1
branches:  trunk
changeset: 466059:998dc26442f1
user:      ad <ad%NetBSD.org@localhost>
date:      Tue Dec 10 11:35:29 2019 +0000

description:
Inverted test.

diffstat:

 sys/kern/kern_mutex.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 1550495206bf -r 998dc26442f1 sys/kern/kern_mutex.c
--- a/sys/kern/kern_mutex.c     Tue Dec 10 11:19:25 2019 +0000
+++ b/sys/kern/kern_mutex.c     Tue Dec 10 11:35:29 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_mutex.c,v 1.82 2019/12/10 11:12:02 ad Exp $       */
+/*     $NetBSD: kern_mutex.c,v 1.83 2019/12/10 11:35:29 ad Exp $       */
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2019 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
 #define        __MUTEX_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.82 2019/12/10 11:12:02 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.83 2019/12/10 11:35:29 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -836,7 +836,7 @@
        MUTEX_ASSERT(mtx, MUTEX_ADAPTIVE_P(mtx));
        kpreempt_disable();
        owner = mtx->mtx_owner;
-       rv = (MUTEX_OWNED(owner) && mutex_oncpu(MUTEX_OWNER(owner));
+       rv = (!MUTEX_OWNED(owner) || mutex_oncpu(MUTEX_OWNER(owner));
        kpreempt_enable();
        return rv;
 #else



Home | Main Index | Thread Index | Old Index