From: Ian Jackson Subject: Re: [PATCH RFC v2 12/13] libxl: New API for providing OS events to libxl Date: Mon, 28 Nov 2011 15:34:40 +0000 Message-ID: <20179.43536.644117.489480@mariner.uk.xensource.com> References: <1319827031-15395-1-git-send-email-ian.jackson@eu.citrix.com> <1319827031-15395-2-git-send-email-ian.jackson@eu.citrix.com> <1319827031-15395-3-git-send-email-ian.jackson@eu.citrix.com> <1319827031-15395-4-git-send-email-ian.jackson@eu.citrix.com> <1319827031-15395-5-git-send-email-ian.jackson@eu.citrix.com> <1319827031-15395-6-git-send-email-ian.jackson@eu.citrix.com> <1319827031-15395-9-git-send-email-ian.jackson@eu.citrix.com> <1319827031-15395-10-git-send-email-ian.jackson@eu.citrix.com> <1319827031-15395-11-git-send-email-ian.jackson@eu.citrix.com> <1319827031-15395-12-git-send-email-ian.jackson@eu.citrix.com> <1319827031-15395-13-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" List-Id: xen-devel@lists.xenproject.org Stefano Stabellini writes ("Re: [Xen-devel] [PATCH RFC v2 12/13] libxl: New API for providing OS events to libxl"): > On Fri, 28 Oct 2011, Ian Jackson wrote: > > + * There are two approaches available. The first is appropriate for > > + * simple programs handling reasonably small numbers of domains: > > + * > > + * for (;;) { > > + * libxl_osevent_beforepoll(...) > > + * poll(); > > + * libxl_osevent_afterpoll(...); > > + * for (;;) { > > + * r=libxl_event_check(...); > > + * if (r==LIBXL_NOT_READY) break; > > + * if (r) handle failure; > > + * do something with the event; > > + * } > > + * } > > It is good that you included an example here but it doesn't follow the > CODING_STYLE I guess you mean the inner indent level being 2 and the missing spaces near "r=". Fixed. Ian.