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

Re: [Xen-devel] minios, use of namespace



On Wed, 2013-06-19 at 16:49 +0100, Ian Jackson wrote:
> For a while I've been intending to provide a better environment for PV
> baremetal guests.  The current arrangements, based on newlib, take
> quite a bit of porting for many programs.  My plan is to take the
> FreeBSD libc, and write a set of functions implementing the "system
> calls" in terms of facilities provided by the Xen PV environment,
> frontend drivers, etc.
> 
> As part of this I intend to reuse much if not all of
> xen.git/extras/mini-os.  However, there is a difficulty with this: the
> functions there have very generic names which if nothing is done will
> get in the way of porting applications.
> 
> It might be possible to deal with this by symbol hiding - except for
> the fact that some applications will want to "open the hatch" and
> bypass the provided POSIX API to deal with Xen features directly.  The
> alternative would be to write an emulated gntdev with an emulated
> ioctl etc., which would just be grim.
> 
> So I think the best solution is to rename the functions in minios to
> use names starting with _.  External symbols starting with _ are
> reserved (by the C specification) for "the implementation", which is
> what we are.

Would it also be usual/helpful to provide a minios-gntdev.h with just a
load of
#define gntdev_foo _gntdev_foo

To make code used by folks opening the hatch a little bit less odd
looking or indeed for internal users of the functions...

> 
> I will also probably find that I want to #ifdef out some bits of
> minios, but I don't expect that to be particularly controversial.
> 
> All the changes I make will, when I submit them as a proper patch
> series, come with corresponding changes to the in-tree consumers of
> minios.
> 
> I won't be producing a patch series to do this particularly soon, but
> I thought I should mention this plan here to see if anyone objects.
> CCing Samuel who knows most about the existing minios and stubdom
> arrangements.
> 
> Thanks,
> Ian.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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