Skip to main content Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. Rust
  4. pw_kernel
  5. kernel
  6. WaitQueueLockGuard

WaitQueueLockGuard

Struct WaitQueueLockGuard 

Source
pub struct WaitQueueLockGuard<'lock, 'sched, K: Kernel, T> {
    inner: SchedLockGuard<'lock, 'sched, K, WaitQueueLockState<K, T>>,
}

Fields§

§inner: SchedLockGuard<'lock, 'sched, K, WaitQueueLockState<K, T>>

Implementations§

Source§

impl<'lock, 'sched, K: Kernel, T> WaitQueueLockGuard<'lock, 'sched, K, T>

Source

pub fn sched(&self) -> &SpinLockGuard<'sched, K, SchedulerState<K>>

Source

pub fn into_sched(self) -> SpinLockGuard<'sched, K, SchedulerState<K>>

Source

pub fn sched_mut(&mut self) -> &mut SpinLockGuard<'sched, K, SchedulerState<K>>

Source

pub fn operate_on_wait_queue<F, R>(self, f: F) -> (Self, R)
where F: FnOnce(SchedLockGuard<'lock, 'sched, K, WaitQueue<K>>) -> (SchedLockGuard<'lock, 'sched, K, WaitQueue<K>>, R),

Source

pub fn wait_until( self, wait_type: WaitType, deadline: Instant<K::Clock>, ) -> (Self, Result<()>)

Source

pub fn wait(self, wait_type: WaitType) -> (Self, Result<()>)

Source

pub fn wake_list_and_reschedule( self, wake_list: WakeList<K>, ) -> SpinLockGuard<'sched, K, SchedulerState<K>>

Wakes all threads in wake_list and reschedules if needed.

Source

pub fn wake_one_and_reschedule( self, ) -> SpinLockGuard<'sched, K, SchedulerState<K>>

Dequeues and wakes one waiter, rescheduling if needed.

Source

pub fn wake_all_and_reschedule( self, ) -> SpinLockGuard<'sched, K, SchedulerState<K>>

Dequeues and wakes all waiters, rescheduling if needed.

Source

pub fn dequeue_one(&mut self, list: &mut WakeList<K>) -> WakeResult

Dequeues the head of the wait queue into list without waking it.

Source

pub fn dequeue_all(&mut self, list: &mut WakeList<K>) -> WakeResult

Dequeues all threads from the wait queue into list without waking them.

Trait Implementations§

Source§

impl<K: Kernel, T> Deref for WaitQueueLockGuard<'_, '_, K, T>

Source§

type Target = T

The resulting type after dereferencing.
Source§

fn deref(&self) -> &T

Dereferences the value.
Source§

impl<K: Kernel, T> DerefMut for WaitQueueLockGuard<'_, '_, K, T>

Source§

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

Mutably dereferences the value.

Auto Trait Implementations§

§

impl<'lock, 'sched, K, T> !RefUnwindSafe for WaitQueueLockGuard<'lock, 'sched, K, T>

§

impl<'lock, 'sched, K, T> !UnwindSafe for WaitQueueLockGuard<'lock, 'sched, K, T>

§

impl<'lock, 'sched, K, T> Forget for WaitQueueLockGuard<'lock, 'sched, K, T>

§

impl<'lock, 'sched, K, T> Freeze for WaitQueueLockGuard<'lock, 'sched, K, T>
where SchedLockGuard<'lock, 'sched, K, WaitQueueLockState<K, T>>: Freeze,

§

impl<'lock, 'sched, K, T> Move for WaitQueueLockGuard<'lock, 'sched, K, T>

§

impl<'lock, 'sched, K, T> Send for WaitQueueLockGuard<'lock, 'sched, K, T>
where SchedLockGuard<'lock, 'sched, K, WaitQueueLockState<K, T>>: Send,

§

impl<'lock, 'sched, K, T> Sync for WaitQueueLockGuard<'lock, 'sched, K, T>
where SchedLockGuard<'lock, 'sched, K, WaitQueueLockState<K, T>>: Sync,

§

impl<'lock, 'sched, K, T> Unpin for WaitQueueLockGuard<'lock, 'sched, K, T>
where SchedLockGuard<'lock, 'sched, K, WaitQueueLockState<K, T>>: Unpin,

§

impl<'lock, 'sched, K, T> UnsafeUnpin for WaitQueueLockGuard<'lock, 'sched, K, T>
where SchedLockGuard<'lock, 'sched, K, WaitQueueLockState<K, T>>: UnsafeUnpin,

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
Source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

Source§

fn cast_into(self) -> U

§

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
§

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

§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.