diff options
| author | Vexu <15308111+Vexu@users.noreply.github.com> | 2019-11-13 00:45:37 +0200 |
|---|---|---|
| committer | Vexu <15308111+Vexu@users.noreply.github.com> | 2019-11-13 00:52:15 +0200 |
| commit | f0c94d95dde320ba5e7509dc1499b33e54a1c951 (patch) | |
| tree | 0a2d9acdfa2a066c0fcee6d893747ee731a5083b /lib/std/os/linux.zig | |
| parent | 110ef2e52825656fc048cba020f0fc36a1e58d13 (diff) | |
| download | zig-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.zig | 2 |
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); |
