mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
Revert "std.Progress: use cmpxchgStrong instead of cmpxchgWeak for locking/unlocking IPC"
This reverts commit b6f99a59a3.
https://codeberg.org/ziglang/zig/pulls/31608#issuecomment-11875362
This commit is contained in:
@@ -450,7 +450,7 @@ pub const Node = struct {
|
||||
const ipc = @atomicLoad(Ipc, ipc_ptr, .monotonic);
|
||||
if (ipc.locked or ipc.valid) continue;
|
||||
const generation = ipc.generation +% 1;
|
||||
if (@cmpxchgStrong(
|
||||
if (@cmpxchgWeak(
|
||||
Ipc,
|
||||
ipc_ptr,
|
||||
ipc,
|
||||
@@ -1133,7 +1133,7 @@ fn serialize(io: Io, serialized_buffer: *Serialized.Buffer) !Serialized {
|
||||
const ipc_data = &serialized_buffer.ipc_data[ipc_index.slot];
|
||||
state: switch (ipc_data.state) {
|
||||
.unused => {
|
||||
if (@cmpxchgStrong(
|
||||
if (@cmpxchgWeak(
|
||||
Ipc,
|
||||
ipc,
|
||||
.{ .locked = false, .valid = true, .generation = ipc_index.generation },
|
||||
|
||||
Reference in New Issue
Block a user