From eb6975f0889db4c2c29d47bb959bc39bd0a9b167 Mon Sep 17 00:00:00 2001 From: protty <45520026+kprotty@users.noreply.github.com> Date: Mon, 31 May 2021 11:11:30 -0500 Subject: std.sync.atomic: extended atomic helper functions (#8866) - deprecates `std.Thread.spinLoopHint` and moves it to `std.atomic.spinLoopHint` - added an Atomic(T) generic wrapper type which replaces atomic.Bool and atomic.Int - in Atomic(T), selectively expose member functions depending on T and include bitwise atomic methods when T is an Integer - added fence() and compilerFence() to std.atomic --- lib/std/os.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/std/os.zig') diff --git a/lib/std/os.zig b/lib/std/os.zig index 93d0b9832d..2fe7ba9c5a 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -5534,7 +5534,7 @@ pub const CopyFileRangeError = error{ var has_copy_file_range_syscall = init: { const kernel_has_syscall = std.Target.current.os.isAtLeast(.linux, .{ .major = 4, .minor = 5 }) orelse true; - break :init std.atomic.Bool.init(kernel_has_syscall); + break :init std.atomic.Atomic(bool).init(kernel_has_syscall); }; /// Transfer data between file descriptors at specified offsets. -- cgit v1.2.3