#[repr(C)]pub struct k_thread {
pub base: _thread_base,
pub callee_saved: _callee_saved,
pub init_data: *mut c_void,
pub join_queue: _wait_q_t,
pub poller: z_poller,
pub resource_pool: *mut k_heap,
pub tls: usize,
pub held_mutexes: sys_slist_t,
pub mutex_pended_on: *mut k_mutex,
pub orig_prio: i8,
pub arch: _thread_arch,
}Expand description
@ingroup thread_apis Thread Structure
Fields§
§base: _thread_base§callee_saved: _callee_saveddefined by the architecture, but all archs need these
init_data: *mut c_voidstatic thread init data
join_queue: _wait_q_tthreads waiting in k_thread_join()
poller: z_poller§resource_pool: *mut k_heapresource pool
tls: usize§held_mutexes: sys_slist_tList of all mutexes currently held by this thread. Used to recalculate the thread’s priority when a mutex is released, and to propagate priority boosts through the ownership chain.
mutex_pended_on: *mut k_mutexMutex this thread is currently blocked on, or NULL if not blocked. Used for chained priority inheritance (to boost the owner of the mutex this thread is waiting for) and for deadlock cycle detection.
orig_prio: i8Thread’s priority before any mutex inheritance boost.
arch: _thread_archarch-specifics: must always be at the end
Trait Implementations§
Auto Trait Implementations§
impl !Send for k_thread
impl !Sync for k_thread
impl Freeze for k_thread
impl RefUnwindSafe for k_thread
impl Unpin for k_thread
impl UnsafeUnpin for k_thread
impl UnwindSafe for k_thread
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