pub struct SchedClassTable {
entries: [SchedClassEntry; 3],
pick_order: [SchedClassId; 3],
steal_order: [SchedClassId; 2],
policy_map: [SchedClassId; 3],
}Fields§
§entries: [SchedClassEntry; 3]§pick_order: [SchedClassId; 3]§steal_order: [SchedClassId; 2]§policy_map: [SchedClassId; 3]Implementations§
Source§impl SchedClassTable
impl SchedClassTable
Sourcepub fn new(
pick_order: [SchedClassId; 3],
steal_order: [SchedClassId; 2],
) -> Self
pub fn new( pick_order: [SchedClassId; 3], steal_order: [SchedClassId; 2], ) -> Self
Creates a new instance.
Sourcefn kind_index(kind: SchedPolicyKind) -> usize
fn kind_index(kind: SchedPolicyKind) -> usize
Performs the kind index operation.
Sourcefn class_index(class: SchedClassId) -> usize
fn class_index(class: SchedClassId) -> usize
Performs the class index operation.
Sourcefn refresh_ranks(&mut self)
fn refresh_ranks(&mut self)
Performs the refresh ranks operation.
Sourcepub fn entries(&self) -> &[SchedClassEntry; 3]
pub fn entries(&self) -> &[SchedClassEntry; 3]
Performs the entries operation.
Sourcepub fn pick_order(&self) -> &[SchedClassId; 3]
pub fn pick_order(&self) -> &[SchedClassId; 3]
Performs the pick order operation.
Sourcepub fn steal_order(&self) -> &[SchedClassId; 2]
pub fn steal_order(&self) -> &[SchedClassId; 2]
Performs the steal order operation.
Sourcepub fn policy_class(&self, kind: SchedPolicyKind) -> SchedClassId
pub fn policy_class(&self, kind: SchedPolicyKind) -> SchedClassId
Performs the policy class operation.
Sourcepub fn policy_map(&self) -> &[SchedClassId; 3]
pub fn policy_map(&self) -> &[SchedClassId; 3]
Performs the policy map operation.
Sourcepub fn set_pick_order(&mut self, pick_order: [SchedClassId; 3]) -> bool
pub fn set_pick_order(&mut self, pick_order: [SchedClassId; 3]) -> bool
Sets pick order.
Sourcepub fn set_steal_order(&mut self, steal_order: [SchedClassId; 2]) -> bool
pub fn set_steal_order(&mut self, steal_order: [SchedClassId; 2]) -> bool
Sets steal order.
Sourcepub fn set_policy_class(
&mut self,
kind: SchedPolicyKind,
class: SchedClassId,
) -> bool
pub fn set_policy_class( &mut self, kind: SchedPolicyKind, class: SchedClassId, ) -> bool
Sets policy class.
Sourcepub fn class_for_policy(&self, policy: SchedPolicy) -> SchedClassId
pub fn class_for_policy(&self, policy: SchedPolicy) -> SchedClassId
Performs the class for policy operation.
Sourcepub fn class_for_task(&self, task: &Task) -> SchedClassId
pub fn class_for_task(&self, task: &Task) -> SchedClassId
Performs the class for task operation.
Trait Implementations§
Source§impl Clone for SchedClassTable
impl Clone for SchedClassTable
Source§fn clone(&self) -> SchedClassTable
fn clone(&self) -> SchedClassTable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SchedClassTable
Source§impl Debug for SchedClassTable
impl Debug for SchedClassTable
Auto Trait Implementations§
impl Freeze for SchedClassTable
impl RefUnwindSafe for SchedClassTable
impl Send for SchedClassTable
impl Sync for SchedClassTable
impl Unpin for SchedClassTable
impl UnsafeUnpin for SchedClassTable
impl UnwindSafe for SchedClassTable
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more