pub trait AtomicOperations {
    unsafe fn atomic_store(dst: *mut Self, val: Self);
    unsafe fn atomic_load(dst: *const Self) -> Self;
    unsafe fn atomic_add(dst: *mut Self, val: Self);
    unsafe fn atomic_sub(dst: *mut Self, val: Self);
    unsafe fn atomic_and(dst: *mut Self, val: Self);
    unsafe fn atomic_clear(dst: *mut Self, val: Self);
    unsafe fn atomic_or(dst: *mut Self, val: Self);
    unsafe fn atomic_xor(dst: *mut Self, val: Self);
}
Expand description

Atomic arithmetic and bitwise operations implemented for numerical types. Each operation is implemented with a single assembly instruction.

Required Methods§

Store value into destination pointee.

Read value from destination pointee.

Add value to destination pointee. Result may wrap around.

Subtract value from destination pointee. Result may wrap around.

Clear all bits in destination pointee that are zeroed in value.

Clear all bits in destination pointee that are set in value

Set all bits in destination pointee that are set in value.

Toggle all bits in destination pointee that are set in value.

Implementations on Foreign Types§

Implementors§