Trait drone_core::thr::SoftThread [−][src]
Software-managed thread.
Safety
SoftThread::pending
must point to an array with pending_size
number
of elements.
Required methods
fn pending() -> *const AtomicU32
[src]
Returns a raw pointer to the pending state storage.
fn pending_priority() -> *const AtomicU8
[src]
Returns a raw pointer to the pending thread priority storage.
fn priority(&self) -> *const AtomicU8
[src]
Returns a raw pointer to the thread priority storage.
Provided methods
unsafe fn set_pending(thr_idx: u16)
[src]
Sets the thr_idx
thread pending.
See the trait level documentation for details.
Safety
thr_idx
must be less thanThread::COUNT
.- This function doesn’t check for the thread token ownership.
unsafe fn will_preempt(thr_idx: u16) -> bool
[src]
Sets the thr_idx
thread pending and returns true
if the thread
priority is higher than the currently priority.
If this function returned true
, a subsequent call to
SoftThread::preempt
is needed.
Safety
thr_idx
must be less thanThread::COUNT
.- This function doesn’t check for the thread token ownership.
fn preempt()
[src]
Runs all pending threads with higher priorities than the current priority.