Trait volatile_mem::VolatileRead[][src]

pub trait VolatileRead<T> where
    Self: VolatileData<T>,
    T: Copy
{ fn read(&self) -> T; }

Volatile data which can be read.

The data to be read is of type T.

Required methods

fn read(&self) -> T[src]

Performs a volatile read of the value in self without moving it. This leaves the memory in self unchanged.

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 read operation any write operation to the same location is undefined behavior.

Loading content...

Implementors

impl<T: Copy, P: Read> VolatileRead<T> for Volatile<T, P>[src]

fn read(&self) -> T[src]

Performs a volatile read of the value in self without moving it. This leaves the memory in self unchanged.

Loading content...