pub struct Task {
pub id: UId,
tid_cntr: usize,
address_space: AddressSpace,
threads: List<ThreadList, UId>,
}Expand description
The struct representing a task.
Fields§
§id: UIdThe unique identifier of the task.
tid_cntr: usizeThe counter for the thread ids.
address_space: AddressSpaceSets up the memory for the task.
threads: List<ThreadList, UId>The threads belonging to this task.
Implementations§
Source§impl Task
impl Task
pub fn new(id: UId, attrs: Attributes) -> Result<Self, Error>
pub fn allocate_tid(&mut self) -> Id
pub fn allocate_stack(&mut self, attrs: &Attributes) -> Result<Stack, Error>
pub fn register_thread<const N: usize>( &mut self, uid: UId, storage: &mut BitReclaimMap<UId, Thread, N>, ) -> Result<(), Error>
pub fn tid_cntr(&self) -> usize
pub fn threads_mut(&mut self) -> &mut List<ThreadList, UId>
pub fn threads(&self) -> &List<ThreadList, UId>
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl !Send for Task
impl !Sync for Task
impl Unpin for Task
impl UnwindSafe for Task
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