aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/lock.h
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2007-11-18 14:43:53 +0000
committerAttilio Rao <attilio@FreeBSD.org>2007-11-18 14:43:53 +0000
commitf9721b43ed506f2ab7b1a60c6b92a9e4a360c6aa (patch)
tree85188d6cc1153cc1df464313f1de2d46f0d4f067 /sys/sys/lock.h
parent7c7454fe95c01eb79bb11d19e1c97ac6a932594a (diff)
downloadsrc-f9721b43ed506f2ab7b1a60c6b92a9e4a360c6aa.tar.gz
src-f9721b43ed506f2ab7b1a60c6b92a9e4a360c6aa.zip
Expand lock class with the "virtual" function lc_assert which will offer
an unified way for all the lock primitives to express lock assertions. Currenty, lockmgrs and rmlocks don't have assertions, so just panic in that case. This will be a base for more callout improvements. Ok'ed by: jhb, jeff
Notes
Notes: svn path=/head/; revision=173733
Diffstat (limited to 'sys/sys/lock.h')
-rw-r--r--sys/sys/lock.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/lock.h b/sys/sys/lock.h
index 2a9c4aa7ddd2..a70e0771a153 100644
--- a/sys/sys/lock.h
+++ b/sys/sys/lock.h
@@ -57,6 +57,7 @@ struct thread;
struct lock_class {
const char *lc_name;
u_int lc_flags;
+ void (*lc_assert)(struct lock_object *lock, int what);
void (*lc_ddb_show)(struct lock_object *lock);
void (*lc_lock)(struct lock_object *lock, int how);
int (*lc_unlock)(struct lock_object *lock);