[][src]Struct loom::sync::atomic::AtomicU32

pub struct AtomicU32(_);

Mock implementation of std::sync::atomic::$name.

Methods

impl AtomicU32[src]

pub fn new(v: u32) -> Self[src]

Creates a new instance of $name.

pub fn get_mut(&mut self) -> &mut u32[src]

Returns a mutable reference to the underlying integer.

Panics

This function panics if the access is invalid under the Rust memory model.

pub unsafe fn unsync_load(&self) -> u32[src]

Load the value without any synchronization.

pub fn load(&self, order: Ordering) -> u32[src]

Loads a value from the atomic integer.

pub fn store(&self, val: u32, order: Ordering)[src]

Stores a value into the atomic integer.

pub fn swap(&self, val: u32, order: Ordering) -> u32[src]

Stores a value into the atomic integer, returning the previous value.

pub fn compare_and_swap(&self, current: u32, new: u32, order: Ordering) -> u32[src]

Stores a value into the atomic integer if the current value is the same as the current value.

pub fn compare_exchange(
    &self,
    current: u32,
    new: u32,
    success: Ordering,
    failure: Ordering
) -> Result<u32, u32>
[src]

Stores a value into the atomic if the current value is the same as the current value.

pub fn compare_exchange_weak(
    &self,
    current: u32,
    new: u32,
    success: Ordering,
    failure: Ordering
) -> Result<u32, u32>
[src]

Stores a value into the atomic if the current value is the same as the current value.

pub fn fetch_add(&self, val: u32, order: Ordering) -> u32[src]

Adds to the current value, returning the previous value.

pub fn fetch_sub(&self, val: u32, order: Ordering) -> u32[src]

Subtracts from the current value, returning the previous value.

pub fn fetch_and(&self, val: u32, order: Ordering) -> u32[src]

Bitwise "and" with the current value.

pub fn fetch_or(&self, val: u32, order: Ordering) -> u32[src]

Bitwise "or" with the current value.

pub fn fetch_xor(&self, val: u32, order: Ordering) -> u32[src]

Bitwise "xor" with the current value.

Trait Implementations

impl Default for AtomicU32[src]

impl Debug for AtomicU32[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]