Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern split an "a && b" assertion into two so it's clear ...
details: https://anonhg.NetBSD.org/src/rev/ff2e4ff0ee6c
branches: trunk
changeset: 969969:ff2e4ff0ee6c
user: chs <chs%NetBSD.org@localhost>
date: Sun Mar 08 00:26:06 2020 +0000
description:
split an "a && b" assertion into two so it's clear in the dump which condition
was not true even if both are true by the time the dump is written.
diffstat:
sys/kern/kern_mutex.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r fe5f8d347ebc -r ff2e4ff0ee6c sys/kern/kern_mutex.c
--- a/sys/kern/kern_mutex.c Sun Mar 08 00:23:59 2020 +0000
+++ b/sys/kern/kern_mutex.c Sun Mar 08 00:26:06 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_mutex.c,v 1.89 2020/01/23 12:35:23 ad Exp $ */
+/* $NetBSD: kern_mutex.c,v 1.90 2020/03/08 00:26:06 chs 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.89 2020/01/23 12:35:23 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.90 2020/03/08 00:26:06 chs Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -384,8 +384,8 @@
uintptr_t owner = mtx->mtx_owner;
if (MUTEX_ADAPTIVE_P(owner)) {
- MUTEX_ASSERT(mtx, !MUTEX_OWNED(owner) &&
- !MUTEX_HAS_WAITERS(mtx));
+ MUTEX_ASSERT(mtx, !MUTEX_OWNED(owner));
+ MUTEX_ASSERT(mtx, !MUTEX_HAS_WAITERS(mtx));
} else {
MUTEX_ASSERT(mtx, !MUTEX_SPINBIT_LOCKED_P(mtx));
}
Home |
Main Index |
Thread Index |
Old Index