summaryrefslogtreecommitdiffstats
path: root/sys/sys/mutex.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2010-09-29 13:24:56 +0000
committerjhb <jhb@FreeBSD.org>2010-09-29 13:24:56 +0000
commitcaf0cb880211fe703d13207bde78d9225453bf96 (patch)
tree8e3dc23274b6d1a09e64ff0777d74dcdde1b4ae7 /sys/sys/mutex.h
parent0c4cfaf196bd2a404ceace72c44657c50e016f80 (diff)
downloadFreeBSD-src-caf0cb880211fe703d13207bde78d9225453bf96.zip
FreeBSD-src-caf0cb880211fe703d13207bde78d9225453bf96.tar.gz
Account for unlocking a spin mutex in the lock profiling code in the !SMP
case. Submitted by: truckman MFC after: 3 days
Diffstat (limited to 'sys/sys/mutex.h')
-rw-r--r--sys/sys/mutex.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h
index 929bf43..5800f80 100644
--- a/sys/sys/mutex.h
+++ b/sys/sys/mutex.h
@@ -251,8 +251,11 @@ void _thread_lock_flags(struct thread *, int, const char *, int);
#define _rel_spin_lock(mp) do { \
if (mtx_recursed((mp))) \
(mp)->mtx_recurse--; \
- else \
+ else { \
+ LOCKSTAT_PROFILE_RELEASE_LOCK(LS_MTX_SPIN_UNLOCK_RELEASE, \
+ mp); \
(mp)->mtx_lock = MTX_UNOWNED; \
+ } \
spinlock_exit(); \
} while (0)
#endif /* SMP */
OpenPOWER on IntegriCloud