pub enum Priority {
Low = 0,
Normal = 1,
High = 2,
Realtime = 3,
}Expand description
プロセスのスケジュール優先度を表す列挙型。
Variants§
Low = 0
低優先度
Normal = 1
通常優先度
High = 2
高優先度
Realtime = 3
OS の入力と提示のスレッド(メインループ gui_shell・USB の受け取り usb_poll)だけに使う(TODO R4、2026-11-16)。
同じコアの他のスレッドより先に選ばれ、Ready になったら次のタイマー割り込み(10ms 以内)で
動いている他のスレッドを止めて割り込む(scheduler_tick)。どちらも 1 周ごとに yield_now するので、
他のスレッドも動ける(飢餓防止の加算で順番が回ってくる)。
Trait Implementations§
impl Copy for Priority
impl Eq for Priority
Source§impl Ord for Priority
impl Ord for Priority
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Priority
impl PartialOrd for Priority
impl StructuralPartialEq for Priority
Auto Trait Implementations§
impl Freeze for Priority
impl RefUnwindSafe for Priority
impl Send for Priority
impl Sync for Priority
impl Unpin for Priority
impl UnsafeUnpin for Priority
impl UnwindSafe for Priority
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.