Trait volatile_mem::VolatileWrite[][src]

pub trait VolatileWrite<T> where
    Self: VolatileData<T>,
    T: Copy
{ fn write(&mut self, val: T); }

Volatile data which can be written.

The data to be written is of type T.

Required methods

fn write(&mut self, val: T)[src]

Performs a volatile write of self with the given value without reading the old value.

Safety

Just like in C, whether an operation is volatile has no bearing whatsoever on questions involving concurrent access from multiple threads. Volatile accesses behave exactly like non-atomic accesses in that regard. In particular, a race between a write operation any other operation (reading or writing) to the same location is undefined behavior.

Loading content...

Implementors

impl<T: Copy, P: Write> VolatileWrite<T> for Volatile<T, P>[src]

fn write(&mut self, val: T)[src]

Performs a volatile write of self with the given value without reading the old value.

Loading content...