Am 26.10.2021 um 15:41 hat Stefan Hajnoczi geschrieben:
> Actually, nevermind what I said about the callback scenario. I don't
> think that is a problem because the compiler cannot assume the __thread
> variable remains unchanged across the callback. Therefore it cannot
> safely cache the value.

And additionally, I think callbacks are never coroutine_fn (especially
not if they come from an external library), so they must not yield
anyway.

> So I think only the header file scenario is a problem.

The mere existence of a __thread variable in the header file isn't a
problem either, but if QEMU accesses it, we would have to implement
wrappers similar to what you're proposing for QEMU's thread local
variables.

Kevin

Attachment: signature.asc
Description: PGP signature

Reply via email to