From owner-svn-src-head@FreeBSD.ORG Sat May 23 22:57:49 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96B9E106564A; Sat, 23 May 2009 22:57:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6AF858FC36; Sat, 23 May 2009 22:57:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4NMvnEo070349; Sat, 23 May 2009 22:57:49 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4NMvn8w070348; Sat, 23 May 2009 22:57:49 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200905232257.n4NMvn8w070348@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 23 May 2009 22:57:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192672 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2009 22:57:50 -0000 Author: bz Date: Sat May 23 22:57:49 2009 New Revision: 192672 URL: http://svn.freebsd.org/changeset/base/192672 Log: Even if not entirely style clean the heavy nesting of the various vimage options along with all the defines made things really hard to read and get right; thus add comments for the #else/#endif cases. Discussed with: zec Modified: head/sys/sys/vimage.h Modified: head/sys/sys/vimage.h ============================================================================== --- head/sys/sys/vimage.h Sat May 23 22:05:14 2009 (r192671) +++ head/sys/sys/vimage.h Sat May 23 22:57:49 2009 (r192672) @@ -138,13 +138,13 @@ void vnet_mod_deregister_multi(const str #ifdef VIMAGE_GLOBALS #define VSYM(base, sym) (sym) -#else +#else /* !VIMAGE_GLOBALS */ #ifdef VIMAGE #define VSYM(base, sym) ((base)->_ ## sym) -#else +#else /* !VIMAGE */ #define VSYM(base, sym) (base ## _0._ ## sym) -#endif -#endif +#endif /* VIMAGE */ +#endif /* VIMAGE_GLOBALS */ #ifndef VIMAGE_GLOBALS #ifdef VIMAGE @@ -155,11 +155,11 @@ void vnet_mod_deregister_multi(const str #define VNET_SYMMAP(mod, name) \ { #name, offsetof(struct vnet_ ## mod, _ ## name), \ sizeof(((struct vnet_ ## mod *) NULL)->_ ## name) } -#else +#else /* !VIMAGE */ #define VNET_SYMMAP(mod, name) \ { #name, (size_t) &(vnet_ ## mod ## _0._ ## name), \ sizeof(vnet_ ## mod ## _0._ ## name) } -#endif +#endif /* VIMAGE */ #define VNET_SYMMAP_END { NULL, 0 } struct vimage { @@ -194,10 +194,10 @@ struct vprocg { #ifdef VIMAGE LIST_HEAD(vimage_list_head, vimage); extern struct vimage_list_head vimage_head; -#else +#else /* !VIMAGE */ extern struct vprocg vprocg_0; -#endif -#endif +#endif /* VIMAGE */ +#endif /* !VIMAGE_GLOBALS */ #define curvnet curthread->td_vnet @@ -245,7 +245,7 @@ extern struct vprocg vprocg_0; #define CURVNET_RESTORE() \ curvnet = saved_vnet; -#endif /* !VNET_DEBUG */ +#endif /* VNET_DEBUG */ #else /* !VIMAGE */ #define VNET_ASSERT(condition) #define CURVNET_SET(arg) @@ -267,7 +267,7 @@ extern struct vprocg vprocg_0; #endif /* !VNET_DEBUG */ #else /* !VIMAGE */ #define INIT_FROM_VNET(vnet, modindex, modtype, sym) -#endif +#endif /* VIMAGE */ #ifdef VIMAGE LIST_HEAD(vnet_list_head, vnet); @@ -303,7 +303,7 @@ extern struct vprocg_list_head vprocg_he #define P_TO_VIMAGE(p) (p)->p_ucred->cr_vimage #define P_TO_VNET(p) (p)->p_ucred->cr_vimage->v_net #define P_TO_VPROCG(p) (p)->p_ucred->cr_vimage->v_procg -#else +#else /* !VIMAGE */ #define TD_TO_VIMAGE(td) NULL #define TD_TO_VNET(td) NULL #define P_TO_VIMAGE(p) NULL @@ -311,11 +311,11 @@ extern struct vprocg_list_head vprocg_he #ifdef VIMAGE_GLOBALS #define TD_TO_VPROCG(td) NULL #define P_TO_VPROCG(p) NULL -#else +#else /* !VIMAGE_GLOBALS */ #define TD_TO_VPROCG(td) &vprocg_0 #define P_TO_VPROCG(p) &vprocg_0 -#endif -#endif +#endif /* VIMAGE_GLOBALS */ +#endif /* VIMAGE */ /* Non-VIMAGE null-macros */ #define VNET_LIST_RLOCK()