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

Re: [Xen-devel] [PATCH 09 of 16 RFC] blktap3: Introduce the tapdisk control function prototypes



> > Anyway, since I think this header is intended to be used by consumers
> > of blktap (rather than internally) I think you need to namespace the
> > macros. See tools/include/xen-external/bsd-sys-queue-h-seddery and its
> > usages in tools/libxl/Makefile and extras/mini-os/Makefile to create
> > local namespaced versions for libxl and mini-os.
> > 
> Just out of curiosity, what are the benefits of namespacing the
> macros? Google doesn't give anything relevant.

It's just good policy for libraries to avoid clashing with names defined
by the application which uses them, or with other libraries which that
library might be using simultaneously.

IOW an application might have it's own TAILQ_ENTRY macro which has
nothing to do with the one you would like to use. By naming it
BLKTAP_TAILQ_ENTRY in blktap (and in general avoiding generic sounding
names) you minimise the chances of this sort of thing.

Of course if a header/type is purely internal to blktap then this
doesn't matter.

Ian.




_______________________________________________
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®.