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

Re: [Xen-devel] [PATCH 15/15] libxl: New event generation API



Stefano Stabellini writes ("Re: [Xen-devel] [PATCH 15/15] libxl: New event 
generation API"):
> +#define GC_INIT(ctx)  libxl__gc *gc = libxl__init_gc(ctx); if (gc == NULL) 
> return ERROR_NOMEM;

I think we should avoid macros which return from their containing
function, unless they are unavoidable.

Only event-generating libxl entrypoints need to know about the special
rules for handling the lock and ctx.  The set of event-generating
entrypoints to libxl is bounded - they are all part of the event
generation core.

Also, what you are doing here complicates the usual, simple, case.
I would prefer to keep the case that can be simple, simple.

So I think in this case it is better to document the restrictions
rather than try to abolish them with additional behind-the-scenes
machinery.

See also Ian C's comments.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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