#[repr(C)]pub struct PerCpu {
pub arch: PerCpuArch,
present: AtomicBool,
online: AtomicBool,
apic_id: AtomicU32,
kernel_stack_top: AtomicU64,
tlb_ready: AtomicBool,
pub preempt_count: AtomicU32,
pub signal_pending: AtomicU32,
}Expand description
Per-CPU state.
Fields§
§arch: PerCpuArch§present: AtomicBool§online: AtomicBool§apic_id: AtomicU32§kernel_stack_top: AtomicU64§tlb_ready: AtomicBool§preempt_count: AtomicU32Preemption-disable depth counter.
When > 0, maybe_preempt() and yield_task() are no-ops on this CPU.
signal_pending: AtomicU32Fast signal-pending hint for the current CPU.
Set by send_signal when a signal targets the task currently running
on this CPU. Checked by the syscall dispatcher to avoid the expensive
current_task_clone() + scheduler lock when no signal is pending.
AtomicU32 (not AtomicBool) for better cache-line performance.
NOTE TODO : the extra bits are reserved for future fast-pending flags.
Implementations§
Auto Trait Implementations§
impl !Freeze for PerCpu
impl RefUnwindSafe for PerCpu
impl Send for PerCpu
impl Sync for PerCpu
impl Unpin for PerCpu
impl UnsafeUnpin for PerCpu
impl UnwindSafe for PerCpu
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> 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