svn commit: r192362 - in user/kmacy/releng_7_2_fcs/sys: kern sys

Kip Macy kmacy at FreeBSD.org
Tue May 19 01:57:26 UTC 2009


Author: kmacy
Date: Tue May 19 01:57:26 2009
New Revision: 192362
URL: http://svn.freebsd.org/changeset/base/192362

Log:
  fix new witness compile

Modified:
  user/kmacy/releng_7_2_fcs/sys/kern/subr_witness.c
  user/kmacy/releng_7_2_fcs/sys/sys/lock.h

Modified: user/kmacy/releng_7_2_fcs/sys/kern/subr_witness.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/kern/subr_witness.c	Tue May 19 01:41:11 2009	(r192361)
+++ user/kmacy/releng_7_2_fcs/sys/kern/subr_witness.c	Tue May 19 01:57:26 2009	(r192362)
@@ -102,6 +102,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/mutex.h>
 #include <sys/priv.h>
 #include <sys/proc.h>
+#include <sys/sbuf.h>
 #include <sys/stack.h>
 #include <sys/sysctl.h>
 #include <sys/systm.h>
@@ -322,7 +323,7 @@ static void	adopt(struct witness *parent
 #ifdef BLESSING
 static int	blessed(struct witness *, struct witness *);
 #endif
-static int	depart(struct witness *w);
+static void	depart(struct witness *w);
 static struct witness	*enroll(const char *description,
 			    struct lock_class *lock_class);
 static struct lock_instance	*find_instance(struct lock_list_entry *list,
@@ -1687,7 +1688,7 @@ found:
 	return (w);
 }
 
-static int
+static void
 depart(struct witness *w)
 {
 	struct witness_list *list;
@@ -1806,7 +1807,6 @@ adopt(struct witness *parent, struct wit
 static void
 itismychild(struct witness *parent, struct witness *child)
 {
-	struct witness_list *list;
 
 	MPASS(child != NULL && parent != NULL);
 	if (witness_cold == 0)
@@ -2680,6 +2680,6 @@ _witness_debugger(int cond, const char *
 	if (witness_trace && cond)
 		kdb_backtrace();
 	if (witness_kdb && cond)
-		kdb_enter(KDB_WHY_WITNESS, msg);
+		kdb_enter_why(KDB_WHY_WITNESS, msg);
 }
 #endif

Modified: user/kmacy/releng_7_2_fcs/sys/sys/lock.h
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/sys/lock.h	Tue May 19 01:41:11 2009	(r192361)
+++ user/kmacy/releng_7_2_fcs/sys/sys/lock.h	Tue May 19 01:57:26 2009	(r192362)
@@ -112,18 +112,6 @@ struct lock_class {
 #define	LA_NOTRECURSED	0x00000010	/* Lock is not recursed. */
 
 #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
@@ -135,13 +123,9 @@ struct lock_instance {
  * when we traverse the list we read children[count-1] as the first entry
  * down to children[0] as the final entry.
  */
-#define	LOCK_NCHILDREN	3
 
-struct lock_list_entry {
-	struct	lock_list_entry *ll_next;
-	struct	lock_instance ll_children[LOCK_NCHILDREN];
-	u_int	ll_count;
-};
+struct lock_list_entry;
+struct thread;
 
 /*
  * If any of WITNESS, INVARIANTS, or KTR_LOCK KTR tracing has been enabled,


More information about the svn-src-user mailing list