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/
Home Products Support Community News


RE: [Xen-devel] __function API

To: "Anthony Liguori" <aliguori@xxxxxxxxxx>, "Hollis Blanchard" <hollisb@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] __function API
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Thu, 17 Mar 2005 21:06:59 -0000
Cc: <ian.pratt@xxxxxxxxxxxx>
Delivery-date: Thu, 17 Mar 2005 21:30:32 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
Thread-index: AcUrL+PQufcu0z5rQxyrUpH5fqE7NgABJwYA
Thread-topic: [Xen-devel] __function API
> >I have a question about function naming conventions in 
> headers. I've been 
> >assuming that the __ prefix means "internal", i.e. not 
> really part of the 
> >exported API of a header. But I see code like this in 
> >include/asm-x86/shadow.h:

I'd certainly regard that particular example of __foo() calling foo() as
worth fixing. This code is undergoing massive change at the moment
anyhow, so we'll handle the patch.  
> Technically, no identifiers should ever begin with a '__' 
> prefix.  This 
> prefix is reserved for any use by the C standard (section 
> 7.1.3) and is 
> commonly used to generate temporaries by compilers.
> Xen does use '__' frequently as a prefix.  I'm not sure it's worth 
> removing.  It's probably best to avoid doing this in new code though.

I guess we should change these to a single _ , but its not critical


SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
Xen-devel mailing list

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