On Thu Feb 6 17:31:08 2025 +0000, William Horvath wrote:
Is there a known performance or correctness benefit for using the C11 atomic variants? Not that I know of. I just think it makes sense to use them if they're available (and work correctly) instead of needing to write our own. We should also look into server/fd.c... `server/fd.c` defines `atomic_store_*(volatile *ptr, value)` as `*ptr = value` on x86/x86_64. I'm not sure why it defines its own set of atomic helpers, when it also has access to the macros in `include/winnt.h` indirectly. Also, note that these aren't C11 atomics, which would be `atomic_store` and `atomic_load`, without the `__` prefix. Underscore prefixed atomics are compiler builtins.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7281#note_93937