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

pub struct AtomicPtr<T>(_);

Mock implementation of std::sync::atomic::AtomicPtr.

Methods

impl<T> AtomicPtr<T>[src]

pub fn new(v: *mut T) -> AtomicPtr<T>[src]

Creates a new instance of AtomicPtr.

pub unsafe fn unsync_load(&self) -> *mut T[src]

Load the value without any synchronization.

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

Loads a value from the pointer.

pub fn store(&self, val: *mut T, order: Ordering)[src]

Stores a value into the pointer.

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

Stores a value into the pointer, returning the previous value.

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

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

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

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

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

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

Trait Implementations

impl<T> Default for AtomicPtr<T>[src]

impl<T: Debug> Debug for AtomicPtr<T>[src]

Auto Trait Implementations

impl<T> !Send for AtomicPtr<T>

impl<T> !Sync for AtomicPtr<T>

impl<T> Unpin for AtomicPtr<T>

impl<T> UnwindSafe for AtomicPtr<T>

impl<T> RefUnwindSafe for AtomicPtr<T>

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]