WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] is_initial_xendomain()

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] is_initial_xendomain()
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Fri, 18 Aug 2006 09:12:00 +0200
Delivery-date: Fri, 18 Aug 2006 00:12:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Seeing many cases of uses like

#ifdef CONFIG_XEN_PRIVILEGED_GUEST
        if (is_initial_xendomain()) {
                ...
        }
#endif

I'm wondering if it wasn't nice to eliminate the preprocessor
conditionals (which appear to be there only to cut down on
code size) by doing the conditional in a single place instead:

#ifdef CONFIG_XEN_PRIVILEGED_GUEST
#define is_initial_xendomain() (xen_start_info->flags & SIF_INITDOMAIN)
#else
#define is_initial_xendomain() 0
#endif

If that is acceptable, I'm ready to create a respective patch
(but I'd like to avoid spending time on it if there are objections).

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>