Skip to main content

TaskStat

Struct TaskStat 

Source
pub struct TaskStat {
    pub valid: bool,
    pub state: u8,
    pub core: u8,
    pub mem_used: u64,
    pub mem_limit: u64,
    pub name_len: usize,
    pub name: [u8; 128],
    pub restart_count: u64,
    pub queue_depth: u8,
    pub run_ticks: u64,
    pub uptime_secs: u64,
}
Expand description

Snapshot of kernel task state for a single scheduler slot.

Fields§

§valid: bool

True if the slot holds a live task.

§state: u8

Task state: 0=Ready, 1=Running, 2=BlockedOnRecv, 3=BlockedOnSend, 4=Dead.

§core: u8

Core the task is pinned to.

§mem_used: u64

Bytes dynamically allocated so far.

§mem_limit: u64

Maximum bytes the task may allocate.

§name_len: usize

Byte length of the name stored in name.

§name: [u8; 128]

Task name bytes (zero-padded to NAME_MAX bytes).

§restart_count: u64

Number of times this service has been restarted (0 on a fresh boot / first spawn, +1 per respawn). Saturating u64 - effectively unbounded.

§queue_depth: u8

Current inbound IPC queue depth (0-16).

§run_ticks: u64

Timer ticks spent as the running task on its core (monotonic since boot).

§uptime_secs: u64

Seconds since this service last (re)started - resets on restart. Per-service uptime.

Implementations§

Source§

impl TaskStat

Source

pub fn name_str(&self) -> &str

Return the task name as a &str.

Source

pub fn state_str(&self) -> &'static str

Return a short human-readable state label.

Trait Implementations§

Source§

impl Clone for TaskStat

Source§

fn clone(&self) -> TaskStat

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for TaskStat

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.