Module Name: src
Committed By: chs
Date: Sun Mar 8 00:26:06 UTC 2020
Modified Files:
src/sys/kern: kern_mutex.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/kern/kern_mutex.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/kern_mutex.c
diff -u src/sys/kern/kern_mutex.c:1.89 src/sys/kern/kern_mutex.c:1.90
--- src/sys/kern/kern_mutex.c:1.89 Thu Jan 23 12:35:23 2020
+++ src/sys/kern/kern_mutex.c Sun Mar 8 00:26:06 2020
@@ -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 @@ mutex_destroy(kmutex_t *mtx)
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));
}