From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 08/27] tools/libxl: Extra APIs for the save helper Date: Tue, 16 Jun 2015 16:03:34 +0100 Message-ID: <55803AC6.1050302@citrix.com> References: <1434375880-30914-1-git-send-email-andrew.cooper3@citrix.com> <1434375880-30914-9-git-send-email-andrew.cooper3@citrix.com> <1434462606.13744.167.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1434462606.13744.167.camel@citrix.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: Wei Liu , Yang Hongyang , Ian Jackson , Xen-devel List-Id: xen-devel@lists.xenproject.org On 16/06/15 14:50, Ian Campbell wrote: > On Mon, 2015-06-15 at 14:44 +0100, Andrew Cooper wrote: >> With libxl migration v2, there will be other moving parts which might fail, >> requiring the helper to be stopped for reasons which are not its fault. >> >> Signed-off-by: Andrew Cooper >> CC: Ian Campbell >> CC: Ian Jackson >> CC: Wei Liu >> --- >> tools/libxl/libxl_internal.h | 8 ++++++++ >> tools/libxl/libxl_save_callout.c | 16 ++++++++++++++++ >> 2 files changed, 24 insertions(+) >> >> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h >> index 4f204f9..3fcc37a 100644 >> --- a/tools/libxl/libxl_internal.h >> +++ b/tools/libxl/libxl_internal.h >> @@ -3182,6 +3182,14 @@ _hidden void libxl__xc_domain_restore(libxl__egc *egc, >> _hidden void libxl__xc_domain_restore_done(libxl__egc *egc, void *dcs_void, >> int rc, int retval, int errnoval); >> >> +_hidden void libxl__save_helper_abort(libxl__egc *egc, >> + libxl__save_helper_state *shs); >> + >> +static inline bool libxl__save_helper_inuse(const libxl__save_helper_state *shs) >> +{ >> + return libxl__ev_child_inuse(&shs->child); >> +} > Will this be used other than in libxl__save_helper_abort? The two are typically used together, but inuse() does need to be used without abort() as part of joining 3 parallel tasks. ~Andrew