From 9213aa789b4b44711f2747e5ab053a2b1f57a15b Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 5 Apr 2022 23:13:39 -0700 Subject: stage2: ThreadPool: update to new function pointer semantics --- src/ThreadPool.zig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ThreadPool.zig b/src/ThreadPool.zig index ac95def319..36d004cfc6 100644 --- a/src/ThreadPool.zig +++ b/src/ThreadPool.zig @@ -12,7 +12,12 @@ idle_queue: IdleQueue = .{}, const IdleQueue = std.SinglyLinkedList(std.Thread.ResetEvent); const RunQueue = std.SinglyLinkedList(Runnable); const Runnable = struct { - runFn: fn (*Runnable) void, + runFn: RunProto, +}; + +const RunProto = switch (builtin.zig_backend) { + .stage1 => fn (*Runnable) void, + else => *const fn (*Runnable) void, }; const Worker = struct { -- cgit v1.2.3