On Wed, 23 Feb 2022 at 09:45, Paolo Bonzini <pbonz...@redhat.com> wrote: > > On 2/21/22 15:29, Stefan Hajnoczi wrote: > > -static __thread bool iothread_locked = false; > > +QEMU_DEFINE_STATIC_CO_TLS(bool, iothread_locked) > > > > bool qemu_mutex_iothread_locked(void) > > { > > - return iothread_locked; > > + return get_iothread_locked(); > > } > > > > Can we rename either the variable or the function, and avoid the wrapper > altogether?
I think it's useful to distinguish the API for the rest of QEMU (a function) from the implementation used internally (previously a thread-local static, now a similar thing with wrappers.) -- PMM