Struct axtask::CurrentTask
source · pub struct CurrentTask(_);
Available on crate feature
multitask
only.Expand description
A wrapper of AxTaskRef
as the current task.
Implementations§
source§impl CurrentTask
impl CurrentTask
sourcepub fn as_task_ref(&self) -> &AxTaskRef
pub fn as_task_ref(&self) -> &AxTaskRef
Converts CurrentTask
to AxTaskRef
.
Methods from Deref<Target = TaskInner>§
sourcepub fn join(&self) -> Option<i32>
pub fn join(&self) -> Option<i32>
Wait for the task to exit, and return the exit code.
It will return immediately if the task has already exited (but not dropped).
sourcepub fn free_thread_list_lock(&self)
Available on crate feature musl
only.
pub fn free_thread_list_lock(&self)
musl
only.set 0 to thread_list_lock
sourcepub fn set_child_tid(&self, tid: usize)
Available on crate feature musl
only.
pub fn set_child_tid(&self, tid: usize)
musl
only.for set_tid_addr
sourcepub fn is_blocked(&self) -> bool
pub fn is_blocked(&self) -> bool
Check blocking
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CurrentTask
impl Send for CurrentTask
impl Sync for CurrentTask
impl Unpin for CurrentTask
impl !UnwindSafe for CurrentTask
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