On Tue Jul 4 16:23:30 2023 +0000, Gabriel Ivăncescu wrote:
FWIW on x86 it doesn't really matter, since reads are always atomic, and compiler can't re-arrange them due to the other atomics as you mentioned. But `ReadNoFence` is indeed correct for other architectures though.
Updated. FWIW, I found one other part in the wine code basis that does something very similar: https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/combase/marshal.c#L18...
Same logic, so this looks good.