Jinoh Kang (@iamahuman) commented about server/queue.c:
static cursor_pos_t cursor_history[64]; static unsigned int cursor_history_latest;
+#if defined(__i386__) || defined(__x86_64__) + +#define SHARED_WRITE_BEGIN( x ) \ + do { \ + volatile unsigned int __seq = *(x); \ I don't think `volatile` on an unrelated variable can suppress any undesired optimization, or act as a barrier at all[^vol], unlike MSVC. MSVC doesn't necessarily treat `volatile` accesses as an acquire/release barrier either if `/volatile:iso` is specified[^msvc].
[^vol]: [Why the "volatile" type class should not be used](https://www.kernel.org/doc/html/latest/process/volatile-considered-harmful.h...) [^msvc]: [volatile (C++) | Microsoft Learn](https://learn.microsoft.com/en-us/cpp/cpp/volatile-cpp?view=msvc-170) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3103#note_36120