aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/sx.h
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2007-05-08 21:51:37 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2007-05-08 21:51:37 +0000
commit0026c92c3eb83a491bb4bdc1c1309752f7e92edd (patch)
tree666b5595ce1dc5855c3c502c770842207fe32fdc /sys/sys/sx.h
parentc0bfd70306701290fc7529faf499e4d23c41dfef (diff)
downloadsrc-0026c92c3eb83a491bb4bdc1c1309752f7e92edd.tar.gz
src-0026c92c3eb83a491bb4bdc1c1309752f7e92edd.zip
Add destroyed cookie values for sx locks and rwlocks as well as extra
KASSERTs so that any lock operations on a destroyed lock will panic or hang.
Notes
Notes: svn path=/head/; revision=169394
Diffstat (limited to 'sys/sys/sx.h')
-rw-r--r--sys/sys/sx.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/sx.h b/sys/sys/sx.h
index 49acc74eec77..d2688e1ec654 100644
--- a/sys/sys/sx.h
+++ b/sys/sys/sx.h
@@ -85,6 +85,8 @@
#define SX_ONE_SHARER (1 << SX_SHARERS_SHIFT)
#define SX_LOCK_UNLOCKED SX_SHARERS_LOCK(0)
+#define SX_LOCK_DESTROYED \
+ (SX_LOCK_SHARED_WAITERS | SX_LOCK_EXCLUSIVE_WAITERS)
#ifdef _KERNEL