From: Ian Jackson Subject: Re: [PATCH 07/10] libxl: New API for providing OS events to libxl Date: Thu, 12 Jan 2012 15:56:07 +0000 Message-ID: <20239.663.226738.385320@mariner.uk.xensource.com> References: <1325882107-5794-1-git-send-email-ian.jackson@eu.citrix.com> <1325882107-5794-8-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefano Stabellini Cc: "xen-devel@lists.xensource.com" , Ian Campbell List-Id: xen-devel@lists.xenproject.org Stefano Stabellini writes ("Re: [Xen-devel] [PATCH 07/10] libxl: New API for providing OS events to libxl"): > I still prefer the approach prototyped in > http://marc.info/?l=xen-devel&m=132371797519877: avoid introducing > restrictions on how libxl functions have to be called, unify egc and gc, > make it possible to take the lock recursively and use the nested counter > to figure out when to call the callbacks. > It would make my head hurt less when I have to read/write this code, > however others might react differently. I would agree with you if it were the case that editing general code in libxl might involve adding new event-generating functions, or indeed might involve turning existing functions into event-generating ones. But this is not the case. The event-generating portions of the code end up completely separate in any correct implementation - and someone using this machinery doesn't even need to be very aware of this. > Only one more thing: I would kindly ask to move all these event related > functions to a different source file, to make it easier for people to > understand which ones are different from the rest of the library. They are, in libxl_event.c. Unless by "event related" you meant "event generating", in which case I disagree, because I don't think that's the most relevant distinction. Ian.