pub struct ContextSwitchOptimizer<A: Arch> { /* private fields */ }
Expand description
Context switch optimization techniques.
Implementations§
Source§impl<A: Arch> ContextSwitchOptimizer<A>
impl<A: Arch> ContextSwitchOptimizer<A>
pub fn new(arch: A, config: OptimizationConfig) -> Self
Sourcepub unsafe fn optimized_context_switch(
&self,
prev_context: *mut A::SavedContext,
next_context: *const A::SavedContext,
)
pub unsafe fn optimized_context_switch( &self, prev_context: *mut A::SavedContext, next_context: *const A::SavedContext, )
Optimized context switch with timing measurement.
Sourcepub fn get_switch_stats(&self) -> ContextSwitchStats
pub fn get_switch_stats(&self) -> ContextSwitchStats
Get context switch performance statistics.
Sourcepub unsafe fn run_optimization_benchmark(&mut self) -> OptimizationResults
pub unsafe fn run_optimization_benchmark(&mut self) -> OptimizationResults
Run micro-benchmark to optimize context switch parameters.
Sourcepub fn apply_optimizations(&mut self, results: &OptimizationResults)
pub fn apply_optimizations(&mut self, results: &OptimizationResults)
Apply recommended optimizations based on benchmark results.
Auto Trait Implementations§
impl<A> !Freeze for ContextSwitchOptimizer<A>
impl<A> RefUnwindSafe for ContextSwitchOptimizer<A>where
A: RefUnwindSafe,
impl<A> Send for ContextSwitchOptimizer<A>where
A: Send,
impl<A> Sync for ContextSwitchOptimizer<A>where
A: Sync,
impl<A> Unpin for ContextSwitchOptimizer<A>where
A: Unpin,
impl<A> UnwindSafe for ContextSwitchOptimizer<A>where
A: UnwindSafe,
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