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