qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/2] tcg: Bake tb_destroy() into tcg_region_tree


From: Liren Wei
Subject: Re: [PATCH 2/2] tcg: Bake tb_destroy() into tcg_region_tree
Date: Wed, 7 Jul 2021 11:14:08 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 7/7/21 8:34 AM, Richard Henderson wrote:
On 7/4/21 7:31 AM, Liren Wei wrote:
-static gint tb_tc_cmp(gconstpointer ap, gconstpointer bp)
+static gint tb_tc_cmp(gconstpointer ap, gconstpointer bp, gpointer _)

Using _ here as the variable name isn't ideal.  I guess if this were c++ we would actually omit the name, which is kinda the same.  But I think it's just as easy to name it userdata, as per glib docs.

I'll fix that up while queuing, thanks.

Got it, thanks.
I'm not keen that the spinlock init and destroy are in different places, but surely that should be fixed by moving the init to tcg_tb_alloc, probably moving it to tcg/region.c as well.


r~
Indeed, that would be much more clear. But I kind of feel that initialization of TB spinlock is deliberately placed after tcg_gen_code() in the current implementation to prevent buffer_overflow or any rewinding from leaking the initialized spinlock (, through it seems to me that there is nothing to leak for a spinlock whatsoever).

Liren Wei






reply via email to

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