Index: mutex.h =================================================================== RCS file: /cvs/src/sys/arch/m88k/include/mutex.h,v retrieving revision 1.2 diff -u -p -r1.2 mutex.h --- mutex.h 2 Feb 2014 20:31:10 -0000 1.2 +++ mutex.h 2 Jul 2015 05:00:17 -0000 @@ -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)