qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/1] Added address_space_init2().


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 1/1] Added address_space_init2().
Date: Mon, 07 Jan 2013 14:05:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

A "memory: " prefix in the subject would've been nice for filtering.

Am 07.01.2013 13:07, schrieb Alexander Barabash:
> address_space_init2: initializes a named address space.

What for? There are no users in this patch that justify its utility over
setting the field manually.

The name is really awful, maybe ..._init_with_name or add a name
argument to the existing function and let the existing callers pass NULL?

Regards,
Andreas

> 
> Signed-off-by: Alexander Barabash <address@hidden>
> ---
>  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 */

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]