pub struct TaskRef<'a, System>(_, _)
where
System: KernelBase;
Expand description
Represents a single borrowed task in a system.
This type is ABI-compatible with System::
RawTaskId
. It’s
logically equivalent to &'a Task
but instead stores RawTaskId
directly.
See Task
for the owned counterpart and the description
of this kernel object.
See TaskMethods
for the operations provided by this handle
type.
Implementations
sourceimpl<System> TaskRef<'static, System>where
System: KernelBase,
impl<System> TaskRef<'static, System>where
System: KernelBase,
sourcepub const fn define() -> TaskDefiner<System>
pub const fn define() -> TaskDefiner<System>
Construct a TaskDefiner
to define a task in a configuration
function.
Trait Implementations
sourceimpl<System> Clone for TaskRef<'_, System>where
System: KernelBase,
impl<System> Clone for TaskRef<'_, System>where
System: KernelBase,
sourceimpl<System> Debug for TaskRef<'_, System>where
System: KernelBase,
impl<System> Debug for TaskRef<'_, System>where
System: KernelBase,
sourceimpl<System> Hash for TaskRef<'_, System>where
System: KernelBase,
impl<System> Hash for TaskRef<'_, System>where
System: KernelBase,
sourceimpl<System> PartialEq<Task<System>> for TaskRef<'_, System>where
System: NotSupportedYet,
impl<System> PartialEq<Task<System>> for TaskRef<'_, System>where
System: NotSupportedYet,
sourceimpl<System> PartialEq<TaskRef<'_, System>> for Task<System>where
System: NotSupportedYet,
impl<System> PartialEq<TaskRef<'_, System>> for Task<System>where
System: NotSupportedYet,
sourceimpl<System> PartialEq<TaskRef<'_, System>> for TaskRef<'_, System>where
System: KernelBase,
impl<System> PartialEq<TaskRef<'_, System>> for TaskRef<'_, System>where
System: KernelBase,
sourceimpl<System> TaskHandle for TaskRef<'_, System>where
System: KernelBase,
impl<System> TaskHandle for TaskRef<'_, System>where
System: KernelBase,
type System = System
type System = System
The system type this object pertains to.
sourceconst unsafe fn from_id(
id: <System as KernelBase>::RawTaskId
) -> TaskRef<'_, System>
const unsafe fn from_id(
id: <System as KernelBase>::RawTaskId
) -> TaskRef<'_, System>
sourceconst fn id(&self) -> <System as KernelBase>::RawTaskId
const fn id(&self) -> <System as KernelBase>::RawTaskId
Get the raw
RawTaskId
value representing this object.impl<System> Copy for TaskRef<'_, System>where
System: KernelBase,
impl<System> Eq for TaskRef<'_, System>where
System: KernelBase,
Auto Trait Implementations
impl<'a, System> RefUnwindSafe for TaskRef<'a, System>where
<System as KernelBase>::RawTaskId: RefUnwindSafe,
impl<'a, System> Send for TaskRef<'a, System>
impl<'a, System> Sync for TaskRef<'a, System>
impl<'a, System> Unpin for TaskRef<'a, System>where
<System as KernelBase>::RawTaskId: Unpin,
impl<'a, System> UnwindSafe for TaskRef<'a, System>where
<System as KernelBase>::RawTaskId: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> TaskMethods for Twhere
T: TaskHandle,
impl<T> TaskMethods for Twhere
T: TaskHandle,
sourcefn activate(&self) -> Result<(), ActivateTaskError>
fn activate(&self) -> Result<(), ActivateTaskError>
Start the execution of the task.
sourcefn interrupt(&self) -> Result<(), InterruptTaskError>
fn interrupt(&self) -> Result<(), InterruptTaskError>
Interrupt any ongoing wait operations undertaken by the task. Read more
sourcefn unpark(&self) -> Result<(), UnparkError>
fn unpark(&self) -> Result<(), UnparkError>
Make the task’s token available, unblocking
Kernel::park
now or in
the future. Read moresourcefn unpark_exact(&self) -> Result<(), UnparkExactError>
fn unpark_exact(&self) -> Result<(), UnparkExactError>
Make exactly one new token available for the task, unblocking
Kernel::park
now or in the future. Read moresourcefn set_priority(&self, priority: usize) -> Result<(), SetTaskPriorityError>where
Self::System: KernelTaskSetPriority,
fn set_priority(&self, priority: usize) -> Result<(), SetTaskPriorityError>where
Self::System: KernelTaskSetPriority,
Set the task’s base priority. Read more
sourcefn priority(&self) -> Result<usize, GetTaskPriorityError>
fn priority(&self) -> Result<usize, GetTaskPriorityError>
Get the task’s base priority. Read more
sourcefn effective_priority(&self) -> Result<usize, GetTaskPriorityError>
fn effective_priority(&self) -> Result<usize, GetTaskPriorityError>
Get the task’s effective priority. Read more