enumstd.builtin.AtomicRmwOp[src]

This data structure is used by the Zig language code generation and therefore must be kept in sync with the compiler implementation.

Fields

Xchg

Exchange - store the operand unmodified. Supports enums, integers, and floats.

Add

Add operand to existing value. Supports integers and floats. For integers, two's complement wraparound applies.

Sub

Subtract operand from existing value. Supports integers and floats. For integers, two's complement wraparound applies.

And

Perform bitwise AND on existing value with operand. Supports integers.

Nand

Perform bitwise NAND on existing value with operand. Supports integers.

Or

Perform bitwise OR on existing value with operand. Supports integers.

Xor

Perform bitwise XOR on existing value with operand. Supports integers.

Max

Store operand if it is larger than the existing value. Supports integers and floats.

Min

Store operand if it is smaller than the existing value. Supports integers and floats.

Source Code

Source code
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,
}