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