From owner-p4-projects Mon Nov 11 13:13:10 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B58BF37B404; Mon, 11 Nov 2002 13:13:08 -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 4C85637B401 for ; Mon, 11 Nov 2002 13:13:08 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0609343E3B for ; Mon, 11 Nov 2002 13:13:08 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gABLAnmV094746 for ; Mon, 11 Nov 2002 13:10:49 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gABLAnU4094743 for perforce@freebsd.org; Mon, 11 Nov 2002 13:10:49 -0800 (PST) Date: Mon, 11 Nov 2002 13:10:49 -0800 (PST) Message-Id: <200211112110.gABLAnU4094743@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 20979 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=20979 Change 20979 by rwatson@rwatson_tislabs on 2002/11/11 13:09:50 Whitespace and layout consistency improvements, making it easier to maintain local locking modifications. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#355 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#355 (text+ko) ==== @@ -235,10 +235,19 @@ static struct mtx mac_policy_list_lock; static LIST_HEAD(, mac_policy_conf) mac_policy_list; static int mac_policy_list_busy; -#define MAC_POLICY_LIST_LOCKINIT() mtx_init(&mac_policy_list_lock, \ - "mac_policy_list_lock", NULL, MTX_DEF); -#define MAC_POLICY_LIST_LOCK() mtx_lock(&mac_policy_list_lock); -#define MAC_POLICY_LIST_UNLOCK() mtx_unlock(&mac_policy_list_lock); + +#define MAC_POLICY_LIST_LOCKINIT() do { \ + mtx_init(&mac_policy_list_lock, "mac_policy_list_lock", NULL, \ + MTX_DEF); \ +} while (0) + +#define MAC_POLICY_LIST_LOCK() do { \ + mtx_lock(&mac_policy_list_lock); \ +} while (0) + +#define MAC_POLICY_LIST_UNLOCK() do { \ + mtx_unlock(&mac_policy_list_lock); \ +} while (0) #define MAC_POLICY_LIST_BUSY() do { \ MAC_POLICY_LIST_LOCK(); \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message