| ... | ... | @@ -360,15 +360,13 @@ pub fn spawn(comptime startFn: anytype, context: SpawnContextType(@TypeOf(startF |
| 360 | 360 | MainFuncs.posixThreadMain, |
| 361 | 361 | thread_obj.data.memory.ptr, |
| 362 | 362 | ); |
| 363 | | switch (err) { |
| 364 | | 0 => return thread_obj, |
| 365 | | os.EAGAIN => return error.SystemResources, |
| 363 | return switch (err) { |
| 364 | 0 => thread_obj, |
| 365 | os.EAGAIN => error.SystemResources, |
| 366 | 366 | os.EPERM => unreachable, |
| 367 | 367 | os.EINVAL => unreachable, |
| 368 | | else => return os.unexpectedErrno(err), |
| 369 | | } |
| 370 | | |
| 371 | | return thread_obj; |
| 368 | else => os.unexpectedErrno(err), |
| 369 | }; |
| 372 | 370 | } |
| 373 | 371 | |
| 374 | 372 | var guard_end_offset: usize = undefined; |