Jinoh Kang (@iamahuman) commented about server/queue.c:
+#else +#define __SHARED_WRITE_FENCE( x ) __atomic_add_fetch( &(x), 1, __ATOMIC_RELEASE ) +#endif + +#define SHARED_WRITE_BEGIN( object, type ) \ + do { \ + const type *__shared = (object)->shared; \ + type *shared = (type *)__shared; \ + unsigned int __seq = __SHARED_WRITE_FENCE( shared->seq ); \ + assert( (__seq & 1) != 0 ); \ + do + +#define SHARED_WRITE_END \ + while(0); \ + __seq = __SHARED_WRITE_FENCE( shared->seq ); \ + assert( (__seq & 1) == 0 ); \ How about a more strict check?
```suggestion:-1+0 __seq = __INCR_SHARED_WRITE_SEQ( shared->seq ) - __seq; \ assert( __seq == 1 ); \ ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3103#note_41398