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
On Wed, 23 Feb 2022 at 09:45, Paolo Bonzini 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;
> > +
On Mon, Feb 21, 2022 at 04:09:06PM +0100, Philippe Mathieu-Daudé wrote:
> On 21/2/22 15:29, Stefan Hajnoczi wrote:
> > qemu_mutex_iothread_locked() may be used from coroutines. Standard
> > __thread variables cannot be used by coroutines. Use the coroutine TLS
> > macros instead.
> >
> >
On 21/2/22 15:29, Stefan Hajnoczi wrote:
qemu_mutex_iothread_locked() may be used from coroutines. Standard
__thread variables cannot be used by coroutines. Use the coroutine TLS
macros instead.
Signed-off-by: Stefan Hajnoczi
---
softmmu/cpus.c | 8
1 file changed, 4 insertions(+),
On 21/2/22 15:29, Stefan Hajnoczi wrote:
qemu_mutex_iothread_locked() may be used from coroutines. Standard
__thread variables cannot be used by coroutines. Use the coroutine TLS
macros instead.
Signed-off-by: Stefan Hajnoczi
---
softmmu/cpus.c | 8
1 file changed, 4 insertions(+),
qemu_mutex_iothread_locked() may be used from coroutines. Standard
__thread variables cannot be used by coroutines. Use the coroutine TLS
macros instead.
Signed-off-by: Stefan Hajnoczi
---
softmmu/cpus.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/softmmu/cpus.c