pub struct FastPaths;
Expand description
Fast path implementations for critical threading operations.
Implementations§
Source§impl FastPaths
impl FastPaths
Sourcepub fn quick_state_check(thread: &Thread) -> ThreadState
pub fn quick_state_check(thread: &Thread) -> ThreadState
Ultra-fast thread state check (single atomic read).
Sourcepub fn fast_yield()
pub fn fast_yield()
Fast path for thread yield (minimal overhead).
Sourcepub fn fast_current_thread_id() -> ThreadId
pub fn fast_current_thread_id() -> ThreadId
Fast path for getting current thread ID.
Sourcepub fn fast_mutex_try_lock(mutex_state: &AtomicUsize) -> bool
pub fn fast_mutex_try_lock(mutex_state: &AtomicUsize) -> bool
Fast path for simple mutex lock attempt.
Sourcepub fn fast_mutex_unlock(mutex_state: &AtomicUsize)
pub fn fast_mutex_unlock(mutex_state: &AtomicUsize)
Fast path for mutex unlock.
Sourcepub fn fast_atomic_increment(counter: &AtomicU64) -> u64
pub fn fast_atomic_increment(counter: &AtomicU64) -> u64
Fast path for atomic counter increment.
Sourcepub fn fast_priority_compare(thread1: &Thread, thread2: &Thread) -> Ordering
pub fn fast_priority_compare(thread1: &Thread, thread2: &Thread) -> Ordering
Fast path for thread priority comparison.
Sourcepub fn fast_affinity_check(thread: &Thread, cpu_id: CpuId) -> bool
pub fn fast_affinity_check(thread: &Thread, cpu_id: CpuId) -> bool
Fast path for CPU affinity check.
Auto Trait Implementations§
impl Freeze for FastPaths
impl RefUnwindSafe for FastPaths
impl Send for FastPaths
impl Sync for FastPaths
impl Unpin for FastPaths
impl UnwindSafe for FastPaths
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