From: Ian Campbell Subject: Re: [PATCH 20 of 29 RFC] libxl: introduce libxl hotplug public API functions Date: Tue, 21 Feb 2012 11:04:32 +0000 Message-ID: <1329822272.25232.86.camel@dagon.hellion.org.uk> References: <20274.42482.96188.319229@mariner.uk.xensource.com> <1329234536.31256.259.camel@zakaz.uk.xensource.com> <20290.38525.59553.807190@mariner.uk.xensource.com> <20290.38711.670497.847758@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20290.38711.670497.847758@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Roger Pau =?ISO-8859-1?Q?Monn=E9?= , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Mon, 2012-02-20 at 18:55 +0000, Ian Jackson wrote: > Ian Jackson writes ("Re: [Xen-devel] [PATCH 20 of 29 RFC] libxl: introduce libxl hotplug public API functions"): > > Ian Campbell writes ("Re: [Xen-devel] [PATCH 20 of 29 RFC] libxl: introduce libxl hotplug public API functions"): > > > Do you integrate with the libxl event loop? If you did wouldn't this be > > > trivial to handle in xl and wouldn't the xldeviced become the trivial > > > setup + run the event loop program? > > > > That would be one way to look at it. > > > > void libxl_xldeviced_enter(libxl_ctx*); /* never returns */ > > Actually, thinking about it, the interface is probably: > > int libxl_devicedaemon_start(libxl_ctx*); > /* Causes this libxl ctx to behave like the xl device daemon > * whenever it is processing libxl events. */ > > and then the caller can do this > > rc = libxl_devicedaemon_start(ctx); > if (rc) ... > > for (;;) { > ... libxl_event_wait ... > } This is the sort of thing I was imagining too. > In principle it would be possible for this device daemon to be part of > some other daemon this way. Yes. Ian