March 26, 2026
11:46 a.m.
On Thu Mar 26 16:46:27 2026 +0000, Tim Clem wrote:
Hm... I have to admit I don't know anything about the appropriate memory ordering here. Seems like the old OSAtomics probably map to `__ATOMIC_SEQ_CST`? Maybe @bshanks would have more knowledge. Yeah they do...
The `&event->event->deliver` one is inside a lock anyhow (and its use is kind of strange, but any comparison to it is happening inside the event lock too). The other uses of `__ATOMIC_RELAXED` are for increasing refcounts, which are always starting at 1, and the only point a full barrier should be needed is to check for destruction, where we still have `__ATOMIC_SEQ_CST`. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10463#note_133901