[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [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
path.

Ian


-------------------------------------------------------
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.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.