summaryrefslogtreecommitdiffstats
path: root/sys/sys/lock.h
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2007-11-18 14:43:53 +0000
committerattilio <attilio@FreeBSD.org>2007-11-18 14:43:53 +0000
commitbfc761fdba732e46979638ae050d0477eaf4b2cb (patch)
tree85188d6cc1153cc1df464313f1de2d46f0d4f067 /sys/sys/lock.h
parent9dbec8e7dff5d2722f0ec81fca3a4d632eaadd19 (diff)
downloadFreeBSD-src-bfc761fdba732e46979638ae050d0477eaf4b2cb.zip
FreeBSD-src-bfc761fdba732e46979638ae050d0477eaf4b2cb.tar.gz
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
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 2a9c4aa..a70e077 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);
OpenPOWER on IntegriCloud