Trait AsFutex

Source
pub trait AsFutex<S> {
    // Required methods
    fn as_futex(&self) -> &Futex<S>;
    fn as_pi_futex(&self) -> &PiFutex<S>;
}
Expand description

Use any AtomicU32 as Futex or PiFutex.

This also allows you to convert between a Futex and a PiFutex or between Private and Shared futexes if you ever need that, as they expose their internal AtomicU32 through .value.

Required Methods§

Source

fn as_futex(&self) -> &Futex<S>

Source

fn as_pi_futex(&self) -> &PiFutex<S>

Implementations on Foreign Types§

Source§

impl<S> AsFutex<S> for AtomicU32

Source§

fn as_futex(&self) -> &Futex<S>

Source§

fn as_pi_futex(&self) -> &PiFutex<S>

Implementors§