From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yang Hongyang Subject: [PATCH for-4.5 v20 02/12] libxl: Extend libxl__ao_device with a libxl__ev_child member Date: Thu, 25 Sep 2014 14:16:14 +0800 Message-ID: <1411625784-4060-3-git-send-email-yanghy@cn.fujitsu.com> References: <1411625784-4060-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: <1411625784-4060-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 --- 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 903cd41..50647d2 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 e931334..add411b 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