aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os/linux.zig
diff options
context:
space:
mode:
authorVexu <15308111+Vexu@users.noreply.github.com>2019-11-13 00:45:37 +0200
committerVexu <15308111+Vexu@users.noreply.github.com>2019-11-13 00:52:15 +0200
commitf0c94d95dde320ba5e7509dc1499b33e54a1c951 (patch)
tree0a2d9acdfa2a066c0fcee6d893747ee731a5083b /lib/std/os/linux.zig
parent110ef2e52825656fc048cba020f0fc36a1e58d13 (diff)
downloadzig-f0c94d95dde320ba5e7509dc1499b33e54a1c951.tar.gz
zig-f0c94d95dde320ba5e7509dc1499b33e54a1c951.zip
use @atomicStore in std lib
Diffstat (limited to 'lib/std/os/linux.zig')
-rw-r--r--lib/std/os/linux.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig
index 618a21f456..7e2f14021f 100644
--- a/lib/std/os/linux.zig
+++ b/lib/std/os/linux.zig
@@ -531,7 +531,7 @@ extern fn init_vdso_clock_gettime(clk: i32, ts: *timespec) usize {
const ptr = @intToPtr(?*const c_void, vdso.lookup(VDSO_CGT_VER, VDSO_CGT_SYM));
// Note that we may not have a VDSO at all, update the stub address anyway
// so that clock_gettime will fall back on the good old (and slow) syscall
- _ = @cmpxchgStrong(?*const c_void, &vdso_clock_gettime, &init_vdso_clock_gettime, ptr, .Monotonic, .Monotonic);
+ @atomicStore(?*const c_void, &vdso_clock_gettime, ptr, .Monotonic);
// Call into the VDSO if available
if (ptr) |fn_ptr| {
const f = @ptrCast(vdso_clock_gettime_ty, fn_ptr);