libxl: events: Make timeout and async exec setup take an ao, not a gc
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 10 Feb 2015 16:13:36 +0000 (16:13 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 26 Jun 2015 15:53:50 +0000 (16:53 +0100)
commitf5f8400fd09989b2b977cb99c34af7cf1a41f47c
tree0f7dc823ebacbc9f63be5579cbe06d243644ac92
parent1bbae427d635121fa73241e4ff4c2f72a889d746
libxl: events: Make timeout and async exec setup take an ao, not a gc

Change the timeout setup functions to take a libxl__ao, not a
libxl__gc.  This is going to be needed for ao abort, because timeouts
are going to be a main hook for ao abort requests - so the timeouts
need to be associated with an ao.

This means that timeouts can only occur as part of a long-running
libxl function (but this is of course correct, as libxl shouldn't have
any global timeouts, and indeed all the call sites have an ao).

Also remove the gc parameter from libxl__async_exec_start.  It can
just use the gc from the ao supplied in the aes.

All the callers follow the obvious patterns and therefore supply the
ao's gc to libxl__async_exec_start and the timeout setup functions.
There is therefore no functional change in this patch.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Yang Hongyang <yanghy@cn.fujitsu.com>
CC: Wen Congyang <wency@cn.fujitsu.com>
CC: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Wen Congyang <wency@cn.fujitsu.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: This patch split off from "Permit timeouts to signal cancellation".
    Rebased; consequently, deal with libxl__async_exec_start.
    CC'd authors of the libxl__async_exec_* functions.
tools/libxl/libxl_aoutils.c
tools/libxl/libxl_device.c
tools/libxl/libxl_dom.c
tools/libxl/libxl_event.c
tools/libxl/libxl_internal.h
tools/libxl/libxl_remus_disk_drbd.c
tools/libxl/libxl_test_timedereg.c