Skip to contentSkip to conversation

is_initial_xendomain()

DISCUSSION Jan Beulich 1 participant 1 message Aug 18, 2006

lore
Share & tools
lore
#0 lore raw

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