| author | |
| committer | |
| log | 866ee4f1c52ae3e5a8ac95c9c5e61b019aa5eadb |
| tree | 8e9d736fe53529aeb48aa7ef11319c0f6bdfae47 |
| parent | f8828e543ab6331395ef4d9f9a2b53770028b6b2 |
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,7 +2761,7 @@ fn batchWaitWindows(t: *Threaded, b: *Io.Batch, timeout: Io.Timeout) Io.Batch.Wa |
| 2761 | const delay_rc = windows.ntdll.NtDelayExecution(windows.TRUE, &delay_interval); | 2761 | const delay_rc = windows.ntdll.NtDelayExecution(windows.TRUE, &delay_interval); |
| 2762 | alertable_syscall.finish(); | 2762 | alertable_syscall.finish(); |
| 2763 | switch (delay_rc) { | 2763 | switch (delay_rc) { |
| 2764 | .SUCCESS => { | 2764 | .SUCCESS, .TIMEOUT => { |
| 2765 | // The thread woke due to the timeout. Although spurious | 2765 | // The thread woke due to the timeout. Although spurious |
| 2766 | // timeouts are OK, when no deadline is passed we must not | 2766 | // timeouts are OK, when no deadline is passed we must not |
| 2767 | // return `error.Timeout`. | 2767 | // return `error.Timeout`. |
lib/std/os/windows/ntdll.zig+7| ... | @@ -594,6 +594,13 @@ pub extern "ntdll" fn NtCancelSynchronousIoFile( | ... | @@ -594,6 +594,13 @@ pub extern "ntdll" fn NtCancelSynchronousIoFile( |
| 594 | IoStatusBlock: *IO_STATUS_BLOCK, | 594 | IoStatusBlock: *IO_STATUS_BLOCK, |
| 595 | ) callconv(.winapi) NTSTATUS; | 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 | pub extern "ntdll" fn NtDelayExecution( | 604 | pub extern "ntdll" fn NtDelayExecution( |
| 598 | Alertable: BOOLEAN, | 605 | Alertable: BOOLEAN, |
| 599 | DelayInterval: *const LARGE_INTEGER, | 606 | DelayInterval: *const LARGE_INTEGER, |