Enum FutexFlags

Source
#[repr(usize)]
pub enum FutexFlags { Wait = 0, Wake = 1, Fd = 2, Requeue = 3, CmpRequeue = 4, WakeOp = 5, LockPi = 6, UnlockPi = 7, TrylockPi = 8, WaitBitset = 9, }
Expand description

Variants§

§

Wait = 0

等待操作,线程阻塞直到被唤醒

§

Wake = 1

唤醒等待的线程

§

Fd = 2

使用文件描述符的 Futex 操作(较少用)

§

Requeue = 3

将等待队列中的线程重新排队到另一个 Futex

§

CmpRequeue = 4

带比较操作的重新排队,只有在值匹配时才执行排队

§

WakeOp = 5

执行复杂的唤醒和重新排队组合操作

§

LockPi = 6

获取 Priority Inheritance 锁

§

UnlockPi = 7

释放 Priority Inheritance 锁

§

TrylockPi = 8

尝试获取 Priority Inheritance 锁(非阻塞)

§

WaitBitset = 9

等待指定的位集合(bitset),类似于 Wait,但支持位掩码

Trait Implementations§

Source§

impl Debug for FutexFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl TryFrom<usize> for FutexFlags

Source§

type Error = TryFromPrimitiveError<FutexFlags>

The type returned in the event of a conversion error.
Source§

fn try_from(number: usize) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for FutexFlags

Source§

const NAME: &'static str = "FutexFlags"

Source§

type Primitive = usize

Source§

type Error = TryFromPrimitiveError<FutexFlags>

Source§

fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>

Auto Trait Implementations§

§

impl Freeze for FutexFlags

§

impl RefUnwindSafe for FutexFlags

§

impl Send for FutexFlags

§

impl Sync for FutexFlags

§

impl Unpin for FutexFlags

§

impl UnwindSafe for FutexFlags

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.