From owner-p4-projects Wed Feb 26 12:27:34 2003 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CEBFB37B405; Wed, 26 Feb 2003 12:27:31 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 714D037B401 for ; Wed, 26 Feb 2003 12:27:31 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C91843FA3 for ; Wed, 26 Feb 2003 12:27:31 -0800 (PST) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h1QKRU0U008237 for ; Wed, 26 Feb 2003 12:27:30 -0800 (PST) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h1QKRUQc008234 for perforce@freebsd.org; Wed, 26 Feb 2003 12:27:30 -0800 (PST) Date: Wed, 26 Feb 2003 12:27:30 -0800 (PST) Message-Id: <200302262027.h1QKRUQc008234@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 25946 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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