diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-04-24 10:44:41 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-04-24 10:44:41 -0700 |
| commit | e86cee258cb0eefca14a94f6b3abb39e8a5f2ef9 (patch) | |
| tree | 6d9aa3b21685b1581787246f953db94cdb486693 /lib/std/atomic/int.zig | |
| parent | 224fbb23c44628b215662c6199dff11cc2851f04 (diff) | |
| parent | 8530b6b7242ebf43b5cb4ae3a2644593f4961a5e (diff) | |
| download | zig-e86cee258cb0eefca14a94f6b3abb39e8a5f2ef9.tar.gz zig-e86cee258cb0eefca14a94f6b3abb39e8a5f2ef9.zip | |
Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen
In particular I wanted the change that makes `suspend;` illegal in the
parser.
Diffstat (limited to 'lib/std/atomic/int.zig')
| -rw-r--r-- | lib/std/atomic/int.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/atomic/int.zig b/lib/std/atomic/int.zig index 1a3bead2df..2d1c5f80e9 100644 --- a/lib/std/atomic/int.zig +++ b/lib/std/atomic/int.zig @@ -31,7 +31,7 @@ pub fn Int(comptime T: type) type { return @atomicRmw(T, &self.unprotected_value, op, operand, ordering); } - pub fn load(self: *Self, comptime ordering: builtin.AtomicOrder) T { + pub fn load(self: *const Self, comptime ordering: builtin.AtomicOrder) T { switch (ordering) { .Unordered, .Monotonic, .Acquire, .SeqCst => {}, else => @compileError("Invalid ordering '" ++ @tagName(ordering) ++ "' for a load operation"), @@ -59,7 +59,7 @@ pub fn Int(comptime T: type) type { return self.rmw(.Sub, 1, .SeqCst); } - pub fn get(self: *Self) T { + pub fn get(self: *const Self) T { return self.load(.SeqCst); } |
