| ... | @@ -8301,6 +8301,7 @@ fn fileReadStreamingWindows(file: File, data: []const []u8) File.Reader.Error!us | ... | @@ -8301,6 +8301,7 @@ fn fileReadStreamingWindows(file: File, data: []const []u8) File.Reader.Error!us |
| 8301 | | 8301 | |
| 8302 | var io_status_block: windows.IO_STATUS_BLOCK = undefined; | 8302 | var io_status_block: windows.IO_STATUS_BLOCK = undefined; |
| 8303 | var done: bool = false; | 8303 | var done: bool = false; |
| | 8304 | const infinite: windows.LARGE_INTEGER = windows.INFINITE; |
| 8304 | | 8305 | |
| 8305 | read: { | 8306 | read: { |
| 8306 | const syscall: Syscall = try .start(); | 8307 | const syscall: Syscall = try .start(); |
| ... | @@ -8329,7 +8330,7 @@ fn fileReadStreamingWindows(file: File, data: []const []u8) File.Reader.Error!us | ... | @@ -8329,7 +8330,7 @@ fn fileReadStreamingWindows(file: File, data: []const []u8) File.Reader.Error!us |
| 8329 | } | 8330 | } |
| 8330 | try syscall.toApc(.{ .handle = file.handle, .iosb = &io_status_block }); | 8331 | try syscall.toApc(.{ .handle = file.handle, .iosb = &io_status_block }); |
| 8331 | while (true) { | 8332 | while (true) { |
| 8332 | switch (windows.ntdll.NtDelayExecution(1, null)) { | 8333 | switch (windows.ntdll.NtDelayExecution(1, &infinite)) { |
| 8333 | .USER_APC => { | 8334 | .USER_APC => { |
| 8334 | if (!done) { | 8335 | if (!done) { |
| 8335 | // Other APC work was queued before calling into this function. | 8336 | // Other APC work was queued before calling into this function. |
| ... | @@ -8338,7 +8339,7 @@ fn fileReadStreamingWindows(file: File, data: []const []u8) File.Reader.Error!us | ... | @@ -8338,7 +8339,7 @@ fn fileReadStreamingWindows(file: File, data: []const []u8) File.Reader.Error!us |
| 8338 | } | 8339 | } |
| 8339 | break syscall.finishApc(); | 8340 | break syscall.finishApc(); |
| 8340 | }, | 8341 | }, |
| 8341 | .SUCCESS, .CANCELLED => { | 8342 | .SUCCESS, .CANCELLED, .TIMEOUT, .ALERTED => { |
| 8342 | try syscall.checkCancelApc(); | 8343 | try syscall.checkCancelApc(); |
| 8343 | continue; | 8344 | continue; |
| 8344 | }, | 8345 | }, |