Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Feb 2003 12:27:30 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 25946 for review
Message-ID:  <200302262027.h1QKRUQc008234@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=25946

Change 25946 by jhb@jhb_laptop on 2003/02/26 12:26:35

	Replace new instances of WITNESS_SLEEP() with WITNESS_WARN().

Affected files ...

.. //depot/projects/smpng/sys/kern/kern_lock.c#19 edit
.. //depot/projects/smpng/sys/kern/kern_mac.c#15 edit

Differences ...

==== //depot/projects/smpng/sys/kern/kern_lock.c#19 (text+ko) ====

@@ -240,7 +240,9 @@
 	}
 
 	if ((flags & (LK_NOWAIT|LK_RELEASE)) == 0)
-		WITNESS_SLEEP(1, &lkp->lk_interlock->mtx_object);
+		WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK,
+		    &lkp->lk_interlock->mtx_object,
+		    "Acquiring lockmgr lock \"%s\"", lkp->lk_wmesg);
 
 	if (panicstr != NULL) {
 		mtx_unlock(lkp->lk_interlock);

==== //depot/projects/smpng/sys/kern/kern_mac.c#15 (text+ko) ====

@@ -264,7 +264,7 @@
 } while (0)
 
 /*
- * We manually invoke WITNESS_SLEEP() to allow Witness to generate
+ * We manually invoke WITNESS_WARN() to allow Witness to generate
  * warnings even if we don't end up ever triggering the wait at
  * run-time.  The consumer of the exclusive interface must not hold
  * any locks (other than potentially Giant) since we may sleep for
@@ -273,7 +273,8 @@
  * be made.
  */
 #define	MAC_POLICY_LIST_EXCLUSIVE() do {				\
-	WITNESS_SLEEP(1, NULL);						\
+	WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,			\
+ 	    "mac_policy_list_exclusive()");				\
 	mtx_lock(&mac_policy_list_lock);				\
 	while (mac_policy_list_busy != 0)				\
 		cv_wait(&mac_policy_list_not_busy,			\

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302262027.h1QKRUQc008234>