From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yang Hongyang Subject: [PATCH for-4.5 v21 04/14] libxl: Extend libxl__ao_device with a libxl__ev_child member Date: Fri, 26 Sep 2014 14:13:09 +0800 Message-ID: <1411711999-3183-5-git-send-email-yanghy@cn.fujitsu.com> References: <1411711999-3183-1-git-send-email-yanghy@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1411711999-3183-1-git-send-email-yanghy@cn.fujitsu.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: xen-devel@lists.xen.org Cc: ian.campbell@citrix.com, wency@cn.fujitsu.com, ian.jackson@eu.citrix.com, yunhong.jiang@intel.com, eddie.dong@intel.com, rshriram@cs.ubc.ca, laijs@cn.fujitsu.com List-Id: xen-devel@lists.xenproject.org This can be used to fork children to allow the asynchronous execution of system calls which only come in a synchronous variant. This will be useful for Remus, in the following patches. Signed-off-by: Yang Hongyang Signed-off-by: Shriram Rajagopalan Acked-by: Ian Jackson Acked-by: Konrad Rzeszutek Wilk --- tools/libxl/libxl_device.c | 1 + tools/libxl/libxl_internal.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c index 4c49c4c..4b51ded 100644 --- a/tools/libxl/libxl_device.c +++ b/tools/libxl/libxl_device.c @@ -453,6 +453,7 @@ void libxl__prepare_ao_device(libxl__ao *ao, libxl__ao_device *aodev) /* We init this here because we might call device_hotplug_done * without actually calling any hotplug script */ libxl__async_exec_init(&aodev->aes); + libxl__ev_child_init(&aodev->child); } /* multidev */ diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index a2dd7ca..4a44482 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -2150,6 +2150,8 @@ struct libxl__ao_device { libxl__async_exec_state aes; /* If we need to update JSON config */ bool update_json; + /* for asynchronous execution of synchronous-only syscalls etc. */ + libxl__ev_child child; }; /* -- 1.9.1