Paul Gofman (@gofman) commented about dlls/ntdll/unix/server.c:
/* A test on Windows 2000 shows that Windows always yields during a wait, but a wait that is hit by an event gets a priority boost as well. This seems to model that behavior the closest. */
- if (ret == STATUS_TIMEOUT) NtYieldExecution();
- if (ret == STATUS_TIMEOUT) (yield_result ? *yield_result = NtYieldExecution() : NtYieldExecution());
This is not an entirely standard use of ternary operator, probably better to have something like ``` unsigned int ret, status; ...
if (ret == STATUS_TIMEOUT) { status = NtYieldExecution(); if (yield_result) *yield_result = status; } ```