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

Re: [Xen-devel] recent major -unstable changes cause ia64 build to be br

To: "Magenheimer, Dan (HP Labs Fort Collins)" <dan.magenheimer@xxxxxx>
Subject: Re: [Xen-devel] recent major -unstable changes cause ia64 build to be broken
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Wed, 11 May 2005 10:04:04 -0500
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 11 May 2005 15:03:53 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <516F50407E01324991DD6D07B0531AD542CA72@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <516F50407E01324991DD6D07B0531AD542CA72@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On May 10, 2005, at 6:05 PM, Magenheimer, Dan (HP Labs Fort Collins) wrote:

it. Here I will repeat my point about relying on implicit includes... :)

Though I agree in principle with not using implicit includes,
it doesn't really work in reality.

Sorry, I strongly disagree. In this case, if every user of alloc_xenheap_page() had included xen/mm.h, you would not have had any problem.

For example, many
header files declare structs that use typedefs for elements
of the struct, which creates a direct dependency on a header
file.  The only way to avoid including the header file directly
in the "parent" header file is by "instructing" all the users
of the "parent" header to first include the subsidiary ones.
The C language doesn't deal with this very well, resulting
in very obscure error messages if something is missing.
And since typedefs cannot be duplicately declared even if
identical (a bug in C I think), there's a catch-22.

If a.h uses something defined in b.h, a.h must include b.h. It is a dependency. It's that simple.

I'm not saying recursive includes don't happen; they do. But once you've got that working and you explicitly include your dependencies, you won't see problems like this mm.h one, where changing one header file causes 10 loosely related files to break. Coincidentally, it also greatly simplifies writing a new set of header files for a new architecture. ;)

I suspect the source of many of your problems is due to the strange combination of two unrelated code bases, which makes your headers even more brittle than Xen/x86...

--
Hollis Blanchard
IBM Linux Technology Center


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

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