Date: Mon, 11 Nov 2002 13:10:49 -0800 (PST) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 20979 for review Message-ID: <200211112110.gABLAnU4094743@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211112110.gABLAnU4094743>