|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] __function API
[resending to the still-active list]
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:
#define __translate_gpfn_to_mfn(_d, gpfn) \
( (shadow_mode_translate(_d)) \
? translate_gpfn_to_mfn(_d, gpfn) \
: (gpfn) )
static inline unsigned long
translate_gpfn_to_mfn(struct domain *rd, unsigned long gpfn)
{
...
}
In this case, __translate_gpfn_to_mfn() is the *only* thing called by common
code. translate_gpfn_to_mfn() is not.
Another example is _domain in asm-x86/mm.h: it's used in common/page_alloc.c.
As I implement the arch->common API, I've been skipping the __functions, but
it seems many of them are in fact part of that API (while many others are
not). In general is it ok for common code to call __functions provided by
architecture headers, or should that be considered a bug?
--
Hollis Blanchard
IBM Linux Technology Center
-------------------------------------------------------
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_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] __function API,
Hollis Blanchard <=
|
|
|
|
|