From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Pau Monne Subject: Re: [PATCH] libxl: make domain resume API asynchronous Date: Wed, 15 Aug 2012 18:40:36 +0100 Message-ID: <502BDF14.1060103@citrix.com> References: <7cec0543f67cefe3755b.1345046336@cosworth.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <7cec0543f67cefe3755b.1345046336@cosworth.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 Campbell Cc: Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Ian Campbell wrote: > # HG changeset patch > # User Ian Campbell > # Date 1345046301 -3600 > # Node ID 7cec0543f67cefe3755bbad0c2262fa2e820d746 > # Parent 30bf79cc14d932fbe6ff572d0438e5a432f69b0a > libxl: make domain resume API asynchronous > = > Although the current implementation has no asynchromous parts I can > envisage it needing to do bits of create/destroy like functionality > which may need async support in the future. > = > To do this make the meat into an internal libxl__domain_resume > function in order to satisfy the no-internal-callers rule for the > async function. > = > Since I needed to touch the logging to s/ctx/CTX/ anyway switch to the > LOG* helper macros. > = > Signed-off-by: Ian Campbell Acked-by: Roger Pau Monn=E9 Just a minor comment below. > = > diff -r 30bf79cc14d9 -r 7cec0543f67c tools/libxl/libxl.c > --- a/tools/libxl/libxl.c Wed Aug 15 14:45:21 2012 +0100 > +++ b/tools/libxl/libxl.c Wed Aug 15 16:58:21 2012 +0100 > @@ -396,15 +396,12 @@ int libxl_domain_rename(libxl_ctx *ctx, = > return rc; > } > = > -int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid, int suspend_canc= el) > +int libxl__domain_resume(libxl__gc *gc, uint32_t domid, int suspend_canc= el) > { > - GC_INIT(ctx); You can also use libxl_ctx *ctx =3D CTX; so there's no need to change all occurrences of ctx with CTX (not that I have a problem with that).