| ... | ... | @@ -4662,13 +4662,14 @@ fn netLookupFallible( |
| 4662 | 4662 | .provider = null, |
| 4663 | 4663 | .next = null, |
| 4664 | 4664 | }; |
| 4665 | const cancel_handle: ?*windows.HANDLE = null; |
| 4665 | 4666 | var res: *ws2_32.ADDRINFOEXW = undefined; |
| 4666 | 4667 | const timeout: ?*ws2_32.timeval = null; |
| 4667 | 4668 | while (true) { |
| 4668 | 4669 | try t.checkCancel(); // TODO make requestCancel call GetAddrInfoExCancel |
| 4669 | 4670 | // TODO make this append to the queue eagerly rather than blocking until |
| 4670 | 4671 | // the whole thing finishes |
| 4671 | | const rc: ws2_32.WinsockError = @enumFromInt(ws2_32.GetAddrInfoExW(name_w, port_w, .DNS, null, &hints, &res, timeout, null, null)); |
| 4672 | const rc: ws2_32.WinsockError = @enumFromInt(ws2_32.GetAddrInfoExW(name_w, port_w, .DNS, null, &hints, &res, timeout, null, null, cancel_handle)); |
| 4672 | 4673 | switch (rc) { |
| 4673 | 4674 | @as(ws2_32.WinsockError, @enumFromInt(0)) => break, |
| 4674 | 4675 | .EINTR => continue, |
| ... | ... | @@ -5732,17 +5733,16 @@ pub fn futexWake(ptr: *const std.atomic.Value(u32), max_waiters: u32) void { |
| 5732 | 5733 | } else switch (native_os) { |
| 5733 | 5734 | .linux => { |
| 5734 | 5735 | const linux = std.os.linux; |
| 5735 | | const rc = linux.futex_3arg( |
| 5736 | switch (linux.E.init(linux.futex_3arg( |
| 5736 | 5737 | &ptr.raw, |
| 5737 | 5738 | .{ .cmd = .WAKE, .private = true }, |
| 5738 | 5739 | @min(max_waiters, std.math.maxInt(i32)), |
| 5739 | | ); |
| 5740 | | if (is_debug) switch (linux.E.init(rc)) { |
| 5741 | | .SUCCESS => {}, // successful wake up |
| 5742 | | .INVAL => {}, // invalid futex_wait() on ptr done elsewhere |
| 5743 | | .FAULT => {}, // pointer became invalid while doing the wake |
| 5744 | | else => unreachable, // deadlock due to operating system bug |
| 5745 | | }; |
| 5740 | ))) { |
| 5741 | .SUCCESS => return, // successful wake up |
| 5742 | .INVAL => return, // invalid futex_wait() on ptr done elsewhere |
| 5743 | .FAULT => return, // pointer became invalid while doing the wake |
| 5744 | else => return recoverableOsBugDetected(), // deadlock due to operating system bug |
| 5745 | } |
| 5746 | 5746 | }, |
| 5747 | 5747 | .driverkit, .ios, .macos, .tvos, .visionos, .watchos => { |
| 5748 | 5748 | const c = std.c; |