https://bugs.winehq.org/show_bug.cgi?id=46099
--- Comment #51 from Zebediah Figura z.figura12@gmail.com --- (In reply to rawfox from comment #50)
(In reply to Zebediah Figura from comment #49)
(In reply to rawfox from comment #48)
Looks like only the v2 patches got approved. The other 2 futex fixes are not in, resulting in bad game performance. They can be applied to the latest wine commit. What now ?
These have been submitted: https://source.winehq.org/patches/data/155645
If you'd like to open a new bug report for the performance of SC and to track that patch, please feel free.
Thats over my horizon, sorry, but it looks different to this https://bugs.winehq.org/attachment.cgi?id=62897 and this https://bugs.winehq.org/attachment.cgi?id=62902
1st was val = *futex; 2nd was val = __atomic_load_n(futex, __ATOMIC_SEQ_CST); <- this is working good 3rd now val = interlocked_cmpxchg( futex, 0, 0 );
Right; __atomic_load_n() isn't strictly portable; I just used it as a quick proof-of-concept (since all modern compilers should support it). interlocked_cmpxchg( futex, 0, 0 ) is portable and should give the same guarantees wrt. memory ordering.
In wine-staging you added a futex condition patch what touches sync.c . I removed that locally here and added the two missing patches from above that are not yet in wine. That way i can patch it all together with wine-staging.
That's for a different function; see bug 46208 and bug 45524.