Skip to content

Commit

Permalink
ntdll: Yield during PulseEvent().
Browse files Browse the repository at this point in the history
May help with wine-mirror#10, although the real fix there is just not to use esync.
  • Loading branch information
zfigura authored and aeikum committed Dec 20, 2018
1 parent dbb0b68 commit 49aeaed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dlls/ntdll/esync.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 49aeaed

Please sign in to comment.