diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-01-21 20:39:50 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-01-21 20:39:50 -0700 |
| commit | ce7c66e2d0ccaf0265f2c2afce9824c9b9ae6123 (patch) | |
| tree | 8428815a61dac26778872cc588713593335b4bea /lib/std/builtin.zig | |
| parent | 1b8e6b8ba9c6a0f52e2d823218732bb2dc8a0362 (diff) | |
| download | zig-ce7c66e2d0ccaf0265f2c2afce9824c9b9ae6123.tar.gz zig-ce7c66e2d0ccaf0265f2c2afce9824c9b9ae6123.zip | |
langref: make more consistent
* moves some langref into std.builtin doc comments
* use the same way of referencing stuff from std.builtin
closes #16483
Diffstat (limited to 'lib/std/builtin.zig')
| -rw-r--r-- | lib/std/builtin.zig | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig index 24c6036d60..56ee990c5f 100644 --- a/lib/std/builtin.zig +++ b/lib/std/builtin.zig @@ -102,14 +102,34 @@ pub const ReduceOp = enum { /// This data structure is used by the Zig language code generation and /// therefore must be kept in sync with the compiler implementation. pub const AtomicRmwOp = enum { + /// Exchange - store the operand unmodified. + /// Supports enums, integers, and floats. Xchg, + /// Add operand to existing value. + /// Supports integers and floats. + /// For integers, two's complement wraparound applies. Add, + /// Subtract operand from existing value. + /// Supports integers and floats. + /// For integers, two's complement wraparound applies. Sub, + /// Perform bitwise AND on existing value with operand. + /// Supports integers. And, + /// Perform bitwise NAND on existing value with operand. + /// Supports integers. Nand, + /// Perform bitwise OR on existing value with operand. + /// Supports integers. Or, + /// Perform bitwise XOR on existing value with operand. + /// Supports integers. Xor, + /// Store operand if it is larger than the existing value. + /// Supports integers and floats. Max, + /// Store operand if it is smaller than the existing value. + /// Supports integers and floats. Min, }; |
