Wrt patch 4: is "yield CPU" an accurate description of what Sleep(0) does anymore? Separately, is that what we want, instead of NtYieldExecution()?
Indeed the comment isn't really accurate anymore. Still we might want to Sleep(), which is more similar to what we end up doing in wined3d_cs_wait_event(). I'll do some testing.
Except that Sleep(0) and NtYieldExecution() basically do the same thing right now (I had forgot how the whole NtDelayExecution() / NtYieldExecution() thing went). NtDelayExecution(TRUE, ...) / server_wait() or similar seems a bit heavy handed here and I'm not sure we have any interesting alternative.