20 Oct
2025
20 Oct
'25
9:21 p.m.
Hmm... If the cache update is outside of the lock, more than one thread might have retrieved the sync and try to update the cache concurrently.
I think in the current state this will break as multiple thread may pass the `if (InterlockedCompareExchange( &cache->refcount, 0, 0 ))` check successfully.
Oh duh, I can't read. I'll adjust this patch to get rid of the atomic cmpxchg mapping cache memory as we indeed don't need it anymore with the lock. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9234#note_119104