From fbfe48c8815fb095b5dac4eb2029d94c2374d48b Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Sun, 19 Aug 2018 12:50:57 -0500 Subject: [PATCH] ntdll: Yield during PulseEvent(). May help with #10, although the real fix there is just not to use esync. --- dlls/ntdll/esync.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c index fceed2b6722f..b5e6eafcaa2f 100644 --- a/dlls/ntdll/esync.c +++ b/dlls/ntdll/esync.c @@ -627,6 +627,11 @@ NTSTATUS esync_pulse_event( HANDLE handle ) * used (and publicly deprecated). */ if (write( obj->fd, &value, sizeof(value) ) == -1) return FILE_GetNtStatus(); + + /* Try to give other threads a chance to wake up. Hopefully erring on this + * side is the better thing to do... */ + NtYieldExecution(); + read( obj->fd, &value, sizeof(value) ); return STATUS_SUCCESS;