Re: [RFC PATCH] main-loop: introduce WITH_QEMU_IOTHREAD_LOCK

2022-10-25 Thread Paolo Bonzini
On 10/24/22 19:19, Alex Bennée wrote: This helper intends to ape our other auto-unlocking helpers with WITH_QEMU_LOCK_GUARD. The principle difference is the iothread lock is often nested needs a little extra book keeping to ensure we don't double lock or unlock a lock taken higher up the call cha

Re: [RFC PATCH] main-loop: introduce WITH_QEMU_IOTHREAD_LOCK

2022-10-24 Thread Akihiko Odaki
Hi, Thanks for your proposal. I always wanted to see the helper functions with block, which is really specific to Apple-related code are replaced with more QEMU-standard GLib infrastructure. What about returning IoThreadLocked with qemu_iothread_auto_lock() and assign it to g_auto(IoThreadLo

Re: [RFC PATCH] main-loop: introduce WITH_QEMU_IOTHREAD_LOCK

2022-10-24 Thread Richard Henderson
On 10/25/22 03:19, Alex Bennée wrote: This helper intends to ape our other auto-unlocking helpers with WITH_QEMU_LOCK_GUARD. The principle difference is the iothread lock is often nested needs a little extra book keeping to ensure we don't double lock or unlock a lock taken higher up the call cha

[RFC PATCH] main-loop: introduce WITH_QEMU_IOTHREAD_LOCK

2022-10-24 Thread Alex Bennée
This helper intends to ape our other auto-unlocking helpers with WITH_QEMU_LOCK_GUARD. The principle difference is the iothread lock is often nested needs a little extra book keeping to ensure we don't double lock or unlock a lock taken higher up the call chain. Convert some of the common routines