pub struct Scheduler<const N: usize> {
edf: RbTree<RtTree, UId>,
}Fields§
§edf: RbTree<RtTree, UId>Implementations§
Source§impl<const N: usize> Scheduler<N>
impl<const N: usize> Scheduler<N>
pub const fn new() -> Self
pub fn enqueue( &mut self, uid: UId, now: u64, storage: &mut ViewMut<'_, UId, RtServer, BitReclaimMap<UId, Thread, N>>, ) -> Result<(), Error>
Sourcepub fn put(
&mut self,
uid: UId,
dt: u64,
storage: &mut ViewMut<'_, UId, RtServer, BitReclaimMap<UId, Thread, N>>,
) -> Option<u64>
pub fn put( &mut self, uid: UId, dt: u64, storage: &mut ViewMut<'_, UId, RtServer, BitReclaimMap<UId, Thread, N>>, ) -> Option<u64>
This should be called on each do_schedule call, to update the internal scheduler state. If this function returns Some(u64) it means the current thread has exhausted its budget and should be throttled until the returned timestamp.
pub fn pick( &mut self, storage: &mut ViewMut<'_, UId, RtServer, BitReclaimMap<UId, Thread, N>>, ) -> Option<(UId, u32)>
pub fn dequeue( &mut self, uid: UId, storage: &mut ViewMut<'_, UId, RtServer, BitReclaimMap<UId, Thread, N>>, ) -> Result<(), Error>
Auto Trait Implementations§
impl<const N: usize> Freeze for Scheduler<N>
impl<const N: usize> RefUnwindSafe for Scheduler<N>
impl<const N: usize> Send for Scheduler<N>
impl<const N: usize> Sync for Scheduler<N>
impl<const N: usize> Unpin for Scheduler<N>
impl<const N: usize> UnwindSafe for Scheduler<N>
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