summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/m88k/include/mutex.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/arch/m88k/include/mutex.h b/sys/arch/m88k/include/mutex.h
index 1c5413abab3..726a02c77e8 100644
--- a/sys/arch/m88k/include/mutex.h
+++ b/sys/arch/m88k/include/mutex.h
@@ -1,6 +1,6 @@
#ifndef _M88K_MUTEX_H_
#define _M88K_MUTEX_H_
-/* $OpenBSD: mutex.h,v 1.2 2014/02/02 20:31:10 kettenis Exp $ */
+/* $OpenBSD: mutex.h,v 1.3 2015/07/02 08:58:16 dlg Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat.
@@ -55,15 +55,13 @@ void __mtx_init(struct mutex *, int);
#ifdef DIAGNOSTIC
-#define MUTEX_ASSERT_LOCKED(mtx) \
-do { \
- if ((mtx)->mtx_lock == 0 || (mtx)->mtx_cpu != curcpu()) \
+#define MUTEX_ASSERT_LOCKED(mtx) do { \
+ 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 != 0) \
+#define MUTEX_ASSERT_UNLOCKED(mtx) do { \
+ if ((mtx)->mtx_owner == curcpu()) \
panic("mutex %p held in %s", (mtx), __func__); \
} while (0)