Received: from eggs.gnu.org ([208.118.235.92]:52557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsBU9-0003xv-3q for qemu-devel@nongnu.org; Mon, 07 Jan 2013 07:07:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsBU7-0001pY-Ml for qemu-devel@nongnu.org; Mon, 07 Jan 2013 07:07:21 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:39975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsBU7-0001pP-GZ for qemu-devel@nongnu.org; Mon, 07 Jan 2013 07:07:19 -0500 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1TsBU5-0000ku-TG from Alexander_Barabash@mentor.com for qemu-devel@nongnu.org; Mon, 07 Jan 2013 04:07:17 -0800 From: Alexander Barabash Date: Mon, 7 Jan 2013 14:07:05 +0200 Message-ID: <1357560425-15950-1-git-send-email-alexander_barabash@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH 1/1] Added address_space_init2(). List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexander Barabash address_space_init2: initializes a named address space. Signed-off-by: Alexander Barabash --- include/exec/memory.h | 9 +++++++++ memory.c | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index 2322732..8f8a31d 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -820,6 +820,15 @@ void mtree_info(fprintf_function mon_printf, void *f); */ void address_space_init(AddressSpace *as, MemoryRegion *root); +/** + * address_space_init2: initializes a named address space + * + * @as: an uninitialized #AddressSpace + * @root: a #MemoryRegion that routes addesses for the address space + * @name: used for debugging + */ +void address_space_init2(AddressSpace *as, MemoryRegion *root, + const char *name); /** * address_space_destroy: destroy an address space diff --git a/memory.c b/memory.c index 410c5f8..1652c10 100644 --- a/memory.c +++ b/memory.c @@ -1574,6 +1574,12 @@ void address_space_init(AddressSpace *as, MemoryRegion *root) address_space_init_dispatch(as); } +void address_space_init2(AddressSpace *as, MemoryRegion *root, const char *name) +{ + address_space_init(as, root); + as->name = g_strdup(name); +} + void address_space_destroy(AddressSpace *as) { /* Flush out anything from MemoryListeners listening in on this */ -- 1.7.9.5