aboutsummaryrefslogtreecommitdiff
path: root/src/arch/x86_64/CodeGen.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2024-07-11 10:47:23 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2024-07-13 04:47:38 -0400
commita1053e8e1d961ba92ce83a8ef5470ac7f7e92e60 (patch)
treec59338917f7e80fc8bfe8106363a612a9e52b024 /src/arch/x86_64/CodeGen.zig
parentd72a8db2db1a5c77af2deb713248dc53f9adcb73 (diff)
downloadzig-a1053e8e1d961ba92ce83a8ef5470ac7f7e92e60.tar.gz
zig-a1053e8e1d961ba92ce83a8ef5470ac7f7e92e60.zip
InternPool: add and use a mutate mutex for each list
This allows the mutate mutex to only be locked during actual grows, which are rare. For the lists that didn't previously have a mutex, this change has little effect since grows are rare and there is zero contention on a mutex that is only ever locked by one thread. This change allows `extra` to be mutated without racing with a grow.
Diffstat (limited to 'src/arch/x86_64/CodeGen.zig')
-rw-r--r--src/arch/x86_64/CodeGen.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig
index 92aac552d8..dfee2a3bf9 100644
--- a/src/arch/x86_64/CodeGen.zig
+++ b/src/arch/x86_64/CodeGen.zig
@@ -856,7 +856,7 @@ pub fn generate(
@intFromEnum(FrameIndex.stack_frame),
FrameAlloc.init(.{
.size = 0,
- .alignment = func.analysis(ip).stack_alignment.max(.@"1"),
+ .alignment = func.analysisUnordered(ip).stack_alignment.max(.@"1"),
}),
);
function.frame_allocs.set(