replace deprecated std.Atomic(T).fence with load

See https://github.com/ziglang/zig/pull/21585 .
I went with second option listed in `Conditional Barriers` section.

Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
This commit is contained in:
Eric Joldasov 2025-02-09 14:16:36 +05:00
parent ce9921846c
commit 3c77dc458a
No known key found for this signature in database
GPG key ID: 5C9C69060686B588

View file

@ -162,7 +162,7 @@ pub const Dir = struct {
pub fn unref(d: *Dir, t: *Thread) void { pub fn unref(d: *Dir, t: *Thread) void {
if (d.refcnt.fetchSub(1, .release) != 1) return; if (d.refcnt.fetchSub(1, .release) != 1) return;
d.refcnt.fence(.acquire); _ = d.refcnt.load(.acquire);
switch (d.out) { switch (d.out) {
.mem => |*m| m.final(if (d.parent) |p| &p.out.mem else null), .mem => |*m| m.final(if (d.parent) |p| &p.out.mem else null),