| ... | ... | @@ -674,11 +674,6 @@ const PosixThreadImpl = struct { |
| 674 | 674 | |
| 675 | 675 | const Instance = struct { |
| 676 | 676 | fn entryFn(raw_arg: ?*anyopaque) callconv(.C) ?*anyopaque { |
| 677 | | // @alignCast() below doesn't support zero-sized-types (ZST) |
| 678 | | if (@sizeOf(Args) < 1) { |
| 679 | | return callFn(f, @as(Args, undefined)); |
| 680 | | } |
| 681 | | |
| 682 | 677 | const args_ptr: *Args = @ptrCast(@alignCast(raw_arg)); |
| 683 | 678 | defer allocator.destroy(args_ptr); |
| 684 | 679 | return callFn(f, args_ptr.*); |
| ... | ... | @@ -703,7 +698,7 @@ const PosixThreadImpl = struct { |
| 703 | 698 | &handle, |
| 704 | 699 | &attr, |
| 705 | 700 | Instance.entryFn, |
| 706 | | if (@sizeOf(Args) > 1) @as(*anyopaque, @ptrCast(args_ptr)) else undefined, |
| 701 | @ptrCast(args_ptr), |
| 707 | 702 | )) { |
| 708 | 703 | .SUCCESS => return Impl{ .handle = handle }, |
| 709 | 704 | .AGAIN => return error.SystemResources, |