pub struct SchedLockGuard<'lock, 'sched, K: Kernel, T> {
guard: SpinLockGuard<'sched, K, SchedulerState<K>>,
inner: &'lock mut T,
pub(super) kernel: K,
}Fields§
§guard: SpinLockGuard<'sched, K, SchedulerState<K>>§inner: &'lock mut T§kernel: KImplementations§
Source§impl<'lock, 'sched, K: Kernel, T> SchedLockGuard<'lock, 'sched, K, T>
impl<'lock, 'sched, K: Kernel, T> SchedLockGuard<'lock, 'sched, K, T>
pub fn sched(&self) -> &SpinLockGuard<'sched, K, SchedulerState<K>>
pub fn sched_mut(&mut self) -> &mut SpinLockGuard<'sched, K, SchedulerState<K>>
pub fn block(self, current_thread_id: usize, current_thead_state: State) -> Self
Sourcepub unsafe fn smuggle(&self) -> SmuggledSchedLock<K, T>
pub unsafe fn smuggle(&self) -> SmuggledSchedLock<K, T>
§Safety
The caller must guarantee that the underlying lock remains valid and un-moved for the live the smuggled lock.
Source§impl<K: Kernel> SchedLockGuard<'_, '_, K, WaitQueue<K>>
impl<K: Kernel> SchedLockGuard<'_, '_, K, WaitQueue<K>>
fn add_to_queue_and_reschedule( self, thread: ForeignBox<Thread<K>>, wait_type: WaitType, ) -> Self
unsafe fn process_timeout( &mut self, waiting_thread: *mut Thread<K>, ) -> Option<Error>
pub fn wait(self, wait_type: WaitType) -> (Self, Result<()>)
pub fn wait_until( self, wait_type: WaitType, deadline: Instant<K::Clock>, ) -> (Self, Result<()>)
Trait Implementations§
Source§impl<K: Kernel, T> Deref for SchedLockGuard<'_, '_, K, T>
impl<K: Kernel, T> Deref for SchedLockGuard<'_, '_, K, T>
Auto Trait Implementations§
impl<'lock, 'sched, K, T> !RefUnwindSafe for SchedLockGuard<'lock, 'sched, K, T>
impl<'lock, 'sched, K, T> !UnwindSafe for SchedLockGuard<'lock, 'sched, K, T>
impl<'lock, 'sched, K, T> Forget for SchedLockGuard<'lock, 'sched, K, T>
impl<'lock, 'sched, K, T> Freeze for SchedLockGuard<'lock, 'sched, K, T>where
SpinLockGuard<'sched, K, SchedulerState<K>>: Freeze,
&'lock mut T: Freeze,
K: Freeze,
impl<'lock, 'sched, K, T> Move for SchedLockGuard<'lock, 'sched, K, T>
impl<'lock, 'sched, K, T> Send for SchedLockGuard<'lock, 'sched, K, T>where
SpinLockGuard<'sched, K, SchedulerState<K>>: Send,
&'lock mut T: Send,
K: Send,
impl<'lock, 'sched, K, T> Sync for SchedLockGuard<'lock, 'sched, K, T>where
SpinLockGuard<'sched, K, SchedulerState<K>>: Sync,
&'lock mut T: Sync,
impl<'lock, 'sched, K, T> Unpin for SchedLockGuard<'lock, 'sched, K, T>where
SpinLockGuard<'sched, K, SchedulerState<K>>: Unpin,
&'lock mut T: Unpin,
K: Unpin,
impl<'lock, 'sched, K, T> UnsafeUnpin for SchedLockGuard<'lock, 'sched, K, T>where
SpinLockGuard<'sched, K, SchedulerState<K>>: UnsafeUnpin,
&'lock mut T: UnsafeUnpin,
K: UnsafeUnpin,
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more