pub struct ThreadInfo {
pub tgid: u64,
pub tid: u64,
pub comm: String,
pub state: ProcessState,
}Expand description
Information about a Linux thread extracted from task_struct.
In Linux, threads are task_struct entries linked via the thread_group
list. Each thread has its own PID (acting as TID) while sharing the
same tgid (thread group ID, i.e. the process PID).
Fields§
§tgid: u64Thread group ID (the process PID, from task_struct.tgid).
tid: u64Thread ID (the thread’s own PID, from task_struct.pid).
comm: StringThread command name (task_struct.comm).
state: ProcessStateThread state.
Trait Implementations§
Source§impl Clone for ThreadInfo
impl Clone for ThreadInfo
Source§fn clone(&self) -> ThreadInfo
fn clone(&self) -> ThreadInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ThreadInfo
impl RefUnwindSafe for ThreadInfo
impl Send for ThreadInfo
impl Sync for ThreadInfo
impl Unpin for ThreadInfo
impl UnsafeUnpin for ThreadInfo
impl UnwindSafe for ThreadInfo
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