Struct riot_wrappers::thread::KernelPID
source · pub struct KernelPID(/* private fields */);
Expand description
Wrapper around a valid (not necessarily running, but in-range) riot_sys::kernel_pid_t that provides access to thread details and signaling.
Implementations§
source§impl KernelPID
impl KernelPID
pub fn new(pid: kernel_pid_t) -> Option<Self>
pub fn all_pids() -> impl Iterator<Item = KernelPID>
pub fn get_name(&self) -> Option<&str>
sourcepub fn status(&self) -> Result<Status, NoSuchThread>
pub fn status(&self) -> Result<Status, NoSuchThread>
Get the current status of the thread of that number, if one currently exists
pub fn wakeup(&self) -> Result<(), NoSuchThread>
pub fn priority(&self) -> Result<u8, NoSuchThread>
sourcepub fn stack_stats(&self) -> Result<StackStats, StackStatsError>
pub fn stack_stats(&self) -> Result<StackStats, StackStatsError>
Gather information about the stack’s thread.
A None being returned can have two reasons:
- The thread does not exist, or
- develhelp is not active.
This is not backed by C functions (as most of the rest of this crate is), but rather a practical way to access struct members that may or may not be present in a build.
Trait Implementations§
source§impl Into<i16> for &KernelPID
impl Into<i16> for &KernelPID
source§fn into(self) -> kernel_pid_t
fn into(self) -> kernel_pid_t
Converts this type into the (usually inferred) input type.
source§impl Into<i16> for KernelPID
impl Into<i16> for KernelPID
source§fn into(self) -> kernel_pid_t
fn into(self) -> kernel_pid_t
Converts this type into the (usually inferred) input type.
source§impl PartialEq for KernelPID
impl PartialEq for KernelPID
impl Copy for KernelPID
impl StructuralPartialEq for KernelPID
Auto Trait Implementations§
impl RefUnwindSafe for KernelPID
impl Send for KernelPID
impl Sync for KernelPID
impl Unpin for KernelPID
impl UnwindSafe for KernelPID
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