| ... | @@ -8816,9 +8816,10 @@ fn fileReadStreamingPosix(file: File, data: []const []u8) File.ReadStreamingErro | ... | @@ -8816,9 +8816,10 @@ fn fileReadStreamingPosix(file: File, data: []const []u8) File.ReadStreamingErro |
| 8816 | fn fileReadStreamingWindows(file: File, data: []const []u8) File.ReadStreamingError!usize { | 8816 | fn fileReadStreamingWindows(file: File, data: []const []u8) File.ReadStreamingError!usize { |
| 8817 | var io_status_block: windows.IO_STATUS_BLOCK = .{ | 8817 | var io_status_block: windows.IO_STATUS_BLOCK = .{ |
| 8818 | .u = .{ .Status = .PENDING }, | 8818 | .u = .{ .Status = .PENDING }, |
| 8819 | .Information = 0, | 8819 | .Information = undefined, |
| 8820 | }; | 8820 | }; |
| 8821 | try ntReadFile(file.handle, data, &noopApc, null, &io_status_block); | 8821 | try ntReadFile(file.handle, data, &noopApc, null, &io_status_block); |
| | 8822 | |
| 8822 | while (@atomicLoad(windows.NTSTATUS, &io_status_block.u.Status, .acquire) == .PENDING) { | 8823 | while (@atomicLoad(windows.NTSTATUS, &io_status_block.u.Status, .acquire) == .PENDING) { |
| 8823 | // Once we get here we must not return from the function until the | 8824 | // Once we get here we must not return from the function until the |
| 8824 | // operation completes, thereby releasing reference to io_status_block. | 8825 | // operation completes, thereby releasing reference to io_status_block. |
| ... | @@ -8842,10 +8843,7 @@ fn ntReadFileResult(io_status_block: *const windows.IO_STATUS_BLOCK) !usize { | ... | @@ -8842,10 +8843,7 @@ fn ntReadFileResult(io_status_block: *const windows.IO_STATUS_BLOCK) !usize { |
| 8842 | .PENDING => unreachable, | 8843 | .PENDING => unreachable, |
| 8843 | .CANCELLED => unreachable, | 8844 | .CANCELLED => unreachable, |
| 8844 | .SUCCESS => return io_status_block.Information, | 8845 | .SUCCESS => return io_status_block.Information, |
| 8845 | .END_OF_FILE, .PIPE_BROKEN => { | 8846 | .END_OF_FILE, .PIPE_BROKEN => return error.EndOfStream, |
| 8846 | if (io_status_block.Information == 0) return error.EndOfStream; | | |
| 8847 | return io_status_block.Information; | | |
| 8848 | }, | | |
| 8849 | .INVALID_DEVICE_REQUEST => return error.IsDir, | 8847 | .INVALID_DEVICE_REQUEST => return error.IsDir, |
| 8850 | .LOCK_NOT_GRANTED => return error.LockViolation, | 8848 | .LOCK_NOT_GRANTED => return error.LockViolation, |
| 8851 | .ACCESS_DENIED => return error.AccessDenied, | 8849 | .ACCESS_DENIED => return error.AccessDenied, |