| ... | @@ -31,7 +31,7 @@ pub fn Int(comptime T: type) type { | ... | @@ -31,7 +31,7 @@ pub fn Int(comptime T: type) type { |
| 31 | return @atomicRmw(T, &self.unprotected_value, op, operand, ordering); | 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 | switch (ordering) { | 35 | switch (ordering) { |
| 36 | .Unordered, .Monotonic, .Acquire, .SeqCst => {}, | 36 | .Unordered, .Monotonic, .Acquire, .SeqCst => {}, |
| 37 | else => @compileError("Invalid ordering '" ++ @tagName(ordering) ++ "' for a load operation"), | 37 | else => @compileError("Invalid ordering '" ++ @tagName(ordering) ++ "' for a load operation"), |
| ... | @@ -59,7 +59,7 @@ pub fn Int(comptime T: type) type { | ... | @@ -59,7 +59,7 @@ pub fn Int(comptime T: type) type { |
| 59 | return self.rmw(.Sub, 1, .SeqCst); | 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 | return self.load(.SeqCst); | 63 | return self.load(.SeqCst); |
| 64 | } | 64 | } |
| 65 | | 65 | |