18895d05
by William Horvath at 2025-01-28T11:43:32+01:00
ntdll: Fix the return value of NtDelayExecution.
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: STATUS_SUCCESS or STATUS_USER_APC
- Sleep/SleepEx don't modify LastError, no matter what