pub struct TrackedThread {
pid: KernelPID,
tcb: Option<*mut thread_t>,
}
Expand description
A thread identified not only by its PID (which can be reused whenever the thread has quit) but also by a pointer to its thread control block. This gives a TrackedThread a better get_status() method that reliably reports Stopped even when the PID is reused.
A later implementation may stop actually having the pid in the struct and purely rely on the tcb (although that’ll need to become a lifetime’d reference to a cell by then).
Fields§
§pid: KernelPID
§tcb: Option<*mut thread_t>
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TrackedThread
impl RefUnwindSafe for TrackedThread
impl !Send for TrackedThread
impl !Sync for TrackedThread
impl Unpin for TrackedThread
impl UnwindSafe for TrackedThread
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoSwitch for T
impl<T> IntoSwitch for T
Source§fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
Source§fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 12 bytes