pub struct Task {
pub id: TaskId,
/* private fields */
}Expand description
The struct representing a task.
Fields§
§id: TaskIdThe unique identifier of the task.
Implementations§
Source§impl Task
impl Task
Sourcepub fn new(memory_size: usize, id: TaskId) -> Result<Self, KernelError>
pub fn new(memory_size: usize, id: TaskId) -> Result<Self, KernelError>
Create a new task.
memory_size - The size of the memory that the task requires.
Returns a new task if the task was created successfully, or an error if the task could not be created.
pub fn create_thread( &mut self, entry: extern "C" fn(), fin: Option<extern "C" fn() -> !>, timing: Timing, ) -> Result<ThreadDescriptor, KernelError>
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