diff options
Diffstat (limited to 'src/InternPool.zig')
| -rw-r--r-- | src/InternPool.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig index d0dc16c47d..99f937cacf 100644 --- a/src/InternPool.zig +++ b/src/InternPool.zig @@ -2160,6 +2160,14 @@ pub const Key = union(enum) { pub fn resolvedErrorSetUnordered(func: Func, ip: *const InternPool) Index { return @atomicLoad(Index, func.resolvedErrorSetPtr(@constCast(ip)), .unordered); } + + pub fn setResolvedErrorSet(func: Func, ip: *InternPool, ies: Index) void { + const extra_mutex = &ip.getLocal(func.tid).mutate.extra.mutex; + extra_mutex.lock(); + defer extra_mutex.unlock(); + + @atomicStore(Index, func.resolvedErrorSetPtr(ip), ies, .release); + } }; pub const Int = struct { |
