| ... | ... | @@ -1229,7 +1229,8 @@ fn idle(ev: *Evented, thread: *Thread) void { |
| 1229 | 1229 | batch_userdata[0] = next; |
| 1230 | 1230 | } |
| 1231 | 1231 | break :ready_fiber switch (@as(u2, @truncate(next))) { |
| 1232 | | 0b00, 0b01 => @ptrFromInt(next & ~@as(usize, 0b11)), |
| 1232 | 0b00 => @ptrFromInt(next), |
| 1233 | 0b01 => null, // the timeout completion already woke this fiber |
| 1233 | 1234 | 0b10, 0b11 => null, |
| 1234 | 1235 | }; |
| 1235 | 1236 | }, |
| ... | ... | @@ -2406,6 +2407,10 @@ fn batchDrainSubmitted( |
| 2406 | 2407 | return error.ConcurrencyUnavailable |
| 2407 | 2408 | else |
| 2408 | 2409 | .{ .device_io_control = try ev.deviceIoControl(try maybe_sync.enterSync(ev), o) }, |
| 2410 | .net_accept => |o| { |
| 2411 | _ = o; |
| 2412 | @panic("TODO implement batchDrainSubmitted for net_receive"); |
| 2413 | }, |
| 2409 | 2414 | .net_receive => |o| { |
| 2410 | 2415 | _ = o; |
| 2411 | 2416 | @panic("TODO implement batchDrainSubmitted for net_receive"); |
| ... | ... | @@ -2484,7 +2489,10 @@ fn batchDrainReady(batch: *Io.Batch) Io.Timeout.Error!void { |
| 2484 | 2489 | if (@as(?Io.Operation.Result, result: switch (pending.tag) { |
| 2485 | 2490 | .file_read_streaming => .{ |
| 2486 | 2491 | .file_read_streaming = switch (completion.errno()) { |
| 2487 | | .SUCCESS => @as(u32, @bitCast(completion.result)), |
| 2492 | .SUCCESS => if (completion.result == 0) |
| 2493 | error.EndOfStream |
| 2494 | else |
| 2495 | @as(u32, @bitCast(completion.result)), |
| 2488 | 2496 | .INTR => 0, |
| 2489 | 2497 | .CANCELED => break :result null, |
| 2490 | 2498 | .INVAL => |err| errnoBug(err), |
| ... | ... | @@ -2522,6 +2530,7 @@ fn batchDrainReady(batch: *Io.Batch) Io.Timeout.Error!void { |
| 2522 | 2530 | }, |
| 2523 | 2531 | }, |
| 2524 | 2532 | .device_io_control => unreachable, |
| 2533 | .net_accept => @panic("TODO"), |
| 2525 | 2534 | .net_receive => @panic("TODO"), |
| 2526 | 2535 | .net_send => @panic("TODO"), |
| 2527 | 2536 | .net_read => @panic("TODO"), |