mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-30 00:23:24 +00:00
Fix all spelling mistakes in history by typos tool
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
b29d3b5409
commit
86f09eef75
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
//! The implementaion of CPU-local variables that have inner mutability.
|
||||
//! The implementation of CPU-local variables that have inner mutability.
|
||||
|
||||
use core::cell::UnsafeCell;
|
||||
|
||||
@ -35,7 +35,7 @@ use crate::arch;
|
||||
///
|
||||
/// let _irq_guard = ostd::trap::disable_local_irq();
|
||||
/// println!("1st FOO VAL: {:?}", FOO.load());
|
||||
/// // No suprises here, the two accesses must result in the same value.
|
||||
/// // No surprises here, the two accesses must result in the same value.
|
||||
/// println!("2nd FOO VAL: {:?}", FOO.load());
|
||||
/// }
|
||||
/// ```
|
||||
|
@ -58,7 +58,7 @@ macro_rules! cpu_local {
|
||||
|
||||
/// CPU-local objects.
|
||||
///
|
||||
/// CPU-local objects are instanciated once per CPU core. They can be shared to
|
||||
/// CPU-local objects are instantiated once per CPU core. They can be shared to
|
||||
/// other cores. In the context of a preemptible kernel task, when holding the
|
||||
/// reference to the inner object, the object is always the one in the original
|
||||
/// core (when the reference is created), no matter which core the code is
|
||||
@ -169,7 +169,7 @@ impl<T: 'static + Sync> CpuLocal<T> {
|
||||
}
|
||||
|
||||
// SAFETY: At any given time, only one task can access the inner value `T` of a
|
||||
// CPU-local variable if `T` is not `Sync`. We guarentee it by disabling the
|
||||
// CPU-local variable if `T` is not `Sync`. We guarantee it by disabling the
|
||||
// reference to the inner value, or turning off preemptions when creating
|
||||
// the reference.
|
||||
unsafe impl<T: 'static> Sync for CpuLocal<T> {}
|
||||
|
Reference in New Issue
Block a user