| author | |
| committer | |
| log | 9121ee5168e63a6a14af4b8e58a2c869db826e69 |
| tree | 33632aaa0e8529867158d101528b617eb354c142 |
| parent | b976f0d8ad14d503265f1740695f765f994b3c5a |
2 files changed, 8 insertions(+), 1 deletions(-)
lib/std/Io/Threaded.zig+1-1| ... | ... | @@ -2761,7 +2761,7 @@ fn batchWaitWindows(t: *Threaded, b: *Io.Batch, timeout: Io.Timeout) Io.Batch.Wa |
| 2761 | 2761 | const delay_rc = windows.ntdll.NtDelayExecution(windows.TRUE, &delay_interval); |
| 2762 | 2762 | alertable_syscall.finish(); |
| 2763 | 2763 | switch (delay_rc) { |
| 2764 | .SUCCESS => { | |
| 2764 | .SUCCESS, .TIMEOUT => { | |
| 2765 | 2765 | // The thread woke due to the timeout. Although spurious |
| 2766 | 2766 | // timeouts are OK, when no deadline is passed we must not |
| 2767 | 2767 | // return `error.Timeout`. |
lib/std/os/windows/ntdll.zig+7| ... | ... | @@ -594,6 +594,13 @@ pub extern "ntdll" fn NtCancelSynchronousIoFile( |
| 594 | 594 | IoStatusBlock: *IO_STATUS_BLOCK, |
| 595 | 595 | ) callconv(.winapi) NTSTATUS; |
| 596 | 596 | |
| 597 | /// This function has been observed to return SUCCESS on timeout on Windows 10 | |
| 598 | /// and TIMEOUT on Wine 10.0. | |
| 599 | /// | |
| 600 | /// This function has been observed on Windows 11 such that positive interval | |
| 601 | /// is real time, which can cause waits to be interrupted by changing system | |
| 602 | /// time, however negative intervals are not affected by changes to system | |
| 603 | /// time. | |
| 597 | 604 | pub extern "ntdll" fn NtDelayExecution( |
| 598 | 605 | Alertable: BOOLEAN, |
| 599 | 606 | DelayInterval: *const LARGE_INTEGER, |