https://bugs.winehq.org/show_bug.cgi?id=46099
--- Comment #16 from Fabian Maurer dark.shadow4@web.de ---
the problem is occuring because after it has performed the checks but before it can get a lock on keyed_event, thread 0090 has called RtlWakeAddressAll and changed that address' contents. When thread 009e goes into the wait code, the address has been changed but it never gets notified.
This would make sense. AFAIK this can't happen on windows. Though I wouldn't know how I'd write a test for that, to be honest. If that's not done yet, we'd need to buffer the call from WakeAddress, so that when going to sleep we can skip right over it (when the value is actually changed). Only keeping the most recent "wake" in a buffer should be fine.