summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2015-07-02 23:01:20 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2015-07-02 23:01:20 +0000
commit77410da7f38c62c82ed676889c96de1f4d972cf6 (patch)
tree088c40a143a26954ec26d6676694c379ace1eec1
parent7f80b9bccb90ca5c0492a9292ac0388444462c26 (diff)
tweak MUTEX_ASSERT_LOCKED and MUTEX_ASSERT_UNLOCKED to only look
at the owner. every other arch does it the same, so this is to reduce differences between our platforms. ok miod@
-rw-r--r--sys/arch/i386/include/mutex.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/arch/i386/include/mutex.h b/sys/arch/i386/include/mutex.h
index cfcb0435e62..8fce51d2310 100644
--- a/sys/arch/i386/include/mutex.h
+++ b/sys/arch/i386/include/mutex.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mutex.h,v 1.7 2014/03/29 18:09:29 guenther Exp $ */
+/* $OpenBSD: mutex.h,v 1.8 2015/07/02 23:01:19 dlg Exp $ */
/*
* Copyright (c) 2004 Artur Grabowski <art@openbsd.org>
@@ -58,14 +58,12 @@ void __mtx_init(struct mutex *, int);
#define mtx_init(mtx, ipl) __mtx_init((mtx), __MUTEX_IPL((ipl)))
#define MUTEX_ASSERT_LOCKED(mtx) do { \
- if ((mtx)->mtx_lock != 1 || \
- (mtx)->mtx_owner != curcpu()) \
+ if ((mtx)->mtx_owner != curcpu()) \
panic("mutex %p not held in %s", (mtx), __func__); \
} while (0)
#define MUTEX_ASSERT_UNLOCKED(mtx) do { \
- if ((mtx)->mtx_lock == 1 && \
- (mtx)->mtx_owner == curcpu()) \
+ if ((mtx)->mtx_owner == curcpu()) \
panic("mutex %p held in %s", (mtx), __func__); \
} while (0)