| ... | ... | @@ -17548,8 +17548,8 @@ fn unpark(tids: []const UnparkTid, addr_hint: ?*const anyopaque) void { |
| 17548 | 17548 | switch (posix.errno(std.c._lwp_unpark_all(@ptrCast(tids.ptr), tids.len, addr_hint))) { |
| 17549 | 17549 | .SUCCESS => return, |
| 17550 | 17550 | // For errors, fall through to a loop over `tids`, though this is only expected to |
| 17551 | | // be possible for ENOMEM (and even that is questionable). |
| 17552 | | .SRCH => recoverableOsBugDetected(), |
| 17551 | // be possible for ENOMEM (even that is questionable) and ESRCH (see comment below). |
| 17552 | .SRCH => {}, |
| 17553 | 17553 | .FAULT => recoverableOsBugDetected(), |
| 17554 | 17554 | .INVAL => recoverableOsBugDetected(), |
| 17555 | 17555 | .NOMEM => {}, |
| ... | ... | @@ -17558,7 +17558,11 @@ fn unpark(tids: []const UnparkTid, addr_hint: ?*const anyopaque) void { |
| 17558 | 17558 | for (tids) |tid| { |
| 17559 | 17559 | switch (posix.errno(std.c._lwp_unpark(@bitCast(tid), addr_hint))) { |
| 17560 | 17560 | .SUCCESS => {}, |
| 17561 | | .SRCH => recoverableOsBugDetected(), |
| 17561 | .SRCH => { |
| 17562 | // This can happen in a rare race: the thread might have been spuriously |
| 17563 | // unparked, so already observed the changing status, and from there have |
| 17564 | // exited. That's okay, because the thread has woken up like we wanted. |
| 17565 | }, |
| 17562 | 17566 | else => recoverableOsBugDetected(), |
| 17563 | 17567 | } |
| 17564 | 17568 | } |