path: root/sys/sys/lock.h
diff options
authorAttilio Rao <attilio@FreeBSD.org>2008-04-13 01:20:47 +0000
committerAttilio Rao <attilio@FreeBSD.org>2008-04-13 01:20:47 +0000
commit0b0100db8833f834aca08afc4f9329905f5ce936 (patch)
treef6d64801af85c88879cea6fdf99b14cf8336d9d2 /sys/sys/lock.h
parent8d24f82310cbbb3331adc745b475a95a917a212c (diff)
struct lock_instance and struct lock_list_entry don't need to be in the
public namespace for WITNESS as they are only used internally so just move them in the private namespace for the subsystem (with all related supporting definitions).
Notes: svn path=/head/; revision=178165
Diffstat (limited to 'sys/sys/lock.h')
1 files changed, 1 insertions, 34 deletions
diff --git a/sys/sys/lock.h b/sys/sys/lock.h
index 0b07159a1705..2e94120ea412 100644
--- a/sys/sys/lock.h
+++ b/sys/sys/lock.h
@@ -35,6 +35,7 @@
#include <sys/queue.h>
#include <sys/_lock.h>
+struct lock_list_entry;
struct thread;
@@ -91,9 +92,6 @@ struct lock_class {
#define LOCK_CLASS(lock) (lock_classes[LO_CLASSINDEX((lock))])
-#define LI_RECURSEMASK 0x0000ffff /* Recursion depth of lock instance. */
-#define LI_EXCLUSIVE 0x00010000 /* Exclusive lock instance. */
* Option flags passed to lock operations that witness also needs to know
* about or that are generic across all locks.
@@ -115,37 +113,6 @@ struct lock_class {
#ifdef _KERNEL
- * Lock instances. A lock instance is the data associated with a lock while
- * it is held by witness. For example, a lock instance will hold the
- * recursion count of a lock. Lock instances are held in lists. Spin locks
- * are held in a per-cpu list while sleep locks are held in per-thread list.
- */
-struct lock_instance {
- struct lock_object *li_lock;
- const char *li_file; /* File and line of last acquire. */
- int li_line;
- u_int li_flags; /* Recursion count and LI_* flags. */
- * A simple list type used to build the list of locks held by a thread
- * or CPU. We can't simply embed the list in struct lock_object since a
- * lock may be held by more than one thread if it is a shared lock. Locks
- * are added to the head of the list, so we fill up each list entry from
- * "the back" logically. To ease some of the arithmetic, we actually fill
- * in each list entry the normal way (childer[0] then children[1], etc.) but
- * when we traverse the list we read children[count-1] as the first entry
- * down to children[0] as the final entry.
- */
-struct lock_list_entry {
- struct lock_list_entry *ll_next;
- struct lock_instance ll_children[LOCK_NCHILDREN];
- u_int ll_count;
* If any of WITNESS, INVARIANTS, or KTR_LOCK KTR tracing has been enabled,
* then turn on LOCK_DEBUG. When this option is on, extra debugging
* facilities such as tracking the file and line number of lock operations