aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-07-04 17:22:36 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-07-04 17:22:36 -0700
commitfbd6c883213ae9fce9734e2702cd6d3ef7691694 (patch)
tree54b3178757d827e2756165e123d4526332bc3a3a /lib/std/Thread.zig
parentf59bd2be539ce736d2ef04d16f48980d9c02a3ab (diff)
parent6fc9f6c5f6a067475f97cd16cb265332c8b7c6f3 (diff)
downloadzig-fbd6c883213ae9fce9734e2702cd6d3ef7691694.tar.gz
zig-fbd6c883213ae9fce9734e2702cd6d3ef7691694.zip
Merge remote-tracking branch 'origin/master' into llvm14
Diffstat (limited to 'lib/std/Thread.zig')
-rw-r--r--lib/std/Thread.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig
index aaf0fc3440..d52515b88d 100644
--- a/lib/std/Thread.zig
+++ b/lib/std/Thread.zig
@@ -513,7 +513,8 @@ const WindowsThreadImpl = struct {
errdefer assert(windows.kernel32.HeapFree(heap_handle, 0, alloc_ptr) != 0);
const instance_bytes = @ptrCast([*]u8, alloc_ptr)[0..alloc_bytes];
- const instance = std.heap.FixedBufferAllocator.init(instance_bytes).allocator().create(Instance) catch unreachable;
+ var fba = std.heap.FixedBufferAllocator.init(instance_bytes);
+ const instance = fba.allocator().create(Instance) catch unreachable;
instance.* = .{
.fn_args = args,
.thread = .{