https://bugs.winehq.org/show_bug.cgi?id=45524
--- Comment #6 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Zebediah Figura from comment #5)
I'm sorry; I'm not sure I understand. If you mean implementing keyed events on top of futexes; I'm not sure that'll work since I don't think the key has to be a valid pointer (whereas for futexes it absolutely must be). If your concern is with the architecture of the patch, I just followed the model used in critical sections.
I don't understand your concern. For instance look at your new implementation
void WINAPI RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable ) { if (interlocked_dec_if_nonzero( (int *)&variable->Ptr )) - NtReleaseKeyedEvent( keyed_event, &variable->Ptr, FALSE, NULL ); + { + NTSTATUS ret; + if ((ret = fast_wake( variable, 1 )) == STATUS_NOT_IMPLEMENTED) + NtReleaseKeyedEvent( keyed_event, &variable->Ptr, FALSE, NULL ); + } }
Why not move fast_wake() call into the NtReleaseKeyedEvent() implementation?