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