libxl: ao abort: Support aborting where we spot domain death
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 10 Feb 2015 17:53:21 +0000 (17:53 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 26 Jun 2015 15:53:51 +0000 (16:53 +0100)
commit005bc3b588e3e1bd07a97fd752ab17042c41f21b
treeab9dc74c75e86deeb14eeeaa69389d14b169713d
parent668a3dd1f0ae015858bf3c32813de358753c52c4
libxl: ao abort: Support aborting where we spot domain death

Make an active libxl__domaindeathcheck contain an active
libxl__ao_abortable.

Consequential changes are:
 * domaindeath callbacks now take an rc value.
 * libxl__domaindeathcheck_start takes an ao, not a gc.
 * bootloader_domaindeath plumbs the rc through to its caller.
 * libxl__domaindeathcheck_init and _stop are not quite trivial any
   more so are moved from (inline functions) in libxl_internal.h, to
   ordinary functions defined in libxl_event.c.
 * libxl__domaindeathcheck_start is not trivial any more, and now has
   the standard error-handling pattern.

The only current user of libxl__domaindeathcheck is the bootloader.
So the result is that now it is possible to effectively abort domain
creation while the bootloader is running.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: New in this version of the series.
tools/libxl/libxl_bootloader.c
tools/libxl/libxl_event.c
tools/libxl/libxl_internal.h