[][src]Struct linux_futex::op::Op

pub struct Op { /* fields omitted */ }

The operation wake_op applies to the second futex.

An Op must be combined with a Cmp by using the plus operator. For example: Op::assign(1) + Cmp::eq(0)

The argument to any operation must be below 1 << 12 (= 4096).

Implementations

impl Op[src]

pub fn assign(arg: u32) -> Self[src]

Assign the argument to the futex value: value = arg

pub fn add(arg: u32) -> Self[src]

Add the argument to the futex value: value += arg

pub fn or(arg: u32) -> Self[src]

Bitwise-or the futex value with the argument: value |= arg

pub fn and_not(arg: u32) -> Self[src]

Bitwise-and the futex value with the bitwise complement of the argument: value &= !arg

pub fn xor(arg: u32) -> Self[src]

Xor the futex value with the argument: value ^= arg

pub fn assign_bit(bit: u32) -> Self[src]

Assign 1 << bit to the futex value: value = 1 << bit

pub fn add_bit(bit: u32) -> Self[src]

Add 1 << bit to the futex value: value += 1 << bit

pub fn set_bit(bit: u32) -> Self[src]

Set the bitth bit of the futex value: value |= 1 << bit

pub fn clear_bit(bit: u32) -> Self[src]

Clear the bitth bit of the futex value: value &= !(1 << bit)

pub fn toggle_bit(bit: u32) -> Self[src]

Toggle the bitth bit of the futex value: value ^= 1 << bit

Trait Implementations

impl Add<Cmp> for Op[src]

type Output = OpAndCmp

The resulting type after applying the + operator.

impl Clone for Op[src]

impl Copy for Op[src]

impl Debug for Op[src]

impl Eq for Op[src]

impl PartialEq<Op> for Op[src]

impl StructuralEq for Op[src]

impl StructuralPartialEq for Op[src]

Auto Trait Implementations

impl RefUnwindSafe for Op

impl Send for Op

impl Sync for Op

impl Unpin for Op

impl UnwindSafe for Op

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.