#[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
impl Debug for FutexFlags
Source§impl TryFrom<usize> for FutexFlags
impl TryFrom<usize> for FutexFlags
Source§type Error = TryFromPrimitiveError<FutexFlags>
type Error = TryFromPrimitiveError<FutexFlags>
The type returned in the event of a conversion error.
Source§fn try_from(number: usize) -> Result<Self, TryFromPrimitiveError<Self>>
fn try_from(number: usize) -> Result<Self, TryFromPrimitiveError<Self>>
Performs the conversion.