diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-11-23 04:55:28 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-23 04:55:28 -0500 |
| commit | 2bffd810157a8e7c0b2500a13921dd8c45694b8a (patch) | |
| tree | 2f8cfbc0403c5bd492ca68f1aa7ba6b02886ef2c /lib/std/debug.zig | |
| parent | 115ec25f2e4eed5033f34eaee8bf3477ff417ecc (diff) | |
| parent | 70931dbdea96d92feb60406c827e39e566317863 (diff) | |
| download | zig-2bffd810157a8e7c0b2500a13921dd8c45694b8a.tar.gz zig-2bffd810157a8e7c0b2500a13921dd8c45694b8a.zip | |
Merge pull request #18085 from ziglang/std-atomics
rework std.atomic
Diffstat (limited to 'lib/std/debug.zig')
| -rw-r--r-- | lib/std/debug.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig index 129d933eb2..2365398078 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -375,7 +375,7 @@ pub fn panicExtra( /// Non-zero whenever the program triggered a panic. /// The counter is incremented/decremented atomically. -var panicking = std.atomic.Atomic(u8).init(0); +var panicking = std.atomic.Value(u8).init(0); // Locked to avoid interleaving panic messages from multiple threads. var panic_mutex = std.Thread.Mutex{}; @@ -448,7 +448,7 @@ fn waitForOtherThreadToFinishPanicking() void { if (builtin.single_threaded) unreachable; // Sleep forever without hammering the CPU - var futex = std.atomic.Atomic(u32).init(0); + var futex = std.atomic.Value(u32).init(0); while (true) std.Thread.Futex.wait(&futex, 0); unreachable; } |
