| author | |
| committer | |
| log | e86a1df9f23386cc315ac8055ecfe7a6465c5ee3 |
| tree | acb74268bb2a9dc1782f33c9a081e24764277548 |
| parent | dfb34c315576525806a471ae0c4f94b76d362bf9 |
2 files changed, 3 insertions(+), 3 deletions(-)
lib/std/atomic/bool.zig+1-1| ... | ... | @@ -28,7 +28,7 @@ pub const Bool = extern struct { |
| 28 | 28 | return @atomicRmw(bool, &self.unprotected_value, .Xchg, operand, ordering); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | pub fn load(self: *Self, comptime ordering: std.builtin.AtomicOrder) bool { | |
| 31 | pub fn load(self: *const Self, comptime ordering: std.builtin.AtomicOrder) bool { | |
| 32 | 32 | switch (ordering) { |
| 33 | 33 | .Unordered, .Monotonic, .Acquire, .SeqCst => {}, |
| 34 | 34 | else => @compileError("Invalid ordering '" ++ @tagName(ordering) ++ "' for a load operation"), |
lib/std/atomic/int.zig+2-2| ... | ... | @@ -31,7 +31,7 @@ pub fn Int(comptime T: type) type { |
| 31 | 31 | return @atomicRmw(T, &self.unprotected_value, op, operand, ordering); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | pub fn load(self: *Self, comptime ordering: builtin.AtomicOrder) T { | |
| 34 | pub fn load(self: *const Self, comptime ordering: builtin.AtomicOrder) T { | |
| 35 | 35 | switch (ordering) { |
| 36 | 36 | .Unordered, .Monotonic, .Acquire, .SeqCst => {}, |
| 37 | 37 | else => @compileError("Invalid ordering '" ++ @tagName(ordering) ++ "' for a load operation"), |
| ... | ... | @@ -59,7 +59,7 @@ pub fn Int(comptime T: type) type { |
| 59 | 59 | return self.rmw(.Sub, 1, .SeqCst); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | pub fn get(self: *Self) T { | |
| 62 | pub fn get(self: *const Self) T { | |
| 63 | 63 | return self.load(.SeqCst); |
| 64 | 64 | } |
| 65 | 65 |