qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC 5/8] aie: add module for Atomic Instruction Emulat


From: Emilio G. Cota
Subject: Re: [Qemu-devel] [RFC 5/8] aie: add module for Atomic Instruction Emulation
Date: Fri, 8 May 2015 18:41:35 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, May 08, 2015 at 17:02:11 -0400, Emilio G. Cota wrote:
> +++ b/aie.c
(snip)
> +static inline void *aie_entry_init(unsigned long index)
> +{
> +    AIEEntry *entry;
> +
> +    entry = qemu_memalign(64, sizeof(*entry));
> +    tiny_set_init(&entry->ts);
> +    qemu_mutex_init(&entry->lock);
> +    return entry;
> +}
> +
> +AIEEntry *aie_entry_get_lock(hwaddr addr)
> +{
> +    aie_addr_t laddr = to_aie(addr);
> +    AIEEntry *e;
> +
> +    e = qemu_radix_tree_find_alloc(&aie_rtree, laddr, aie_entry_init, 
> g_free);

s/g_free/qemu_vfree/, since the allocation is done (above) with
qemu_memalign.

The tree doesn't support deletions, but still..

                Emilio




reply via email to

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