diff --git a/kernel/src/i386/structures/idt.rs b/kernel/src/i386/structures/idt.rs index e3f839a1f..7077345bd 100644 --- a/kernel/src/i386/structures/idt.rs +++ b/kernel/src/i386/structures/idt.rs @@ -584,7 +584,7 @@ impl IdtEntry { /// Set a task gate for the IDT entry and sets the present bit. /// - /// # Unsafety + /// # Safety /// /// `tss_selector` must point to a valid TSS, which will remain present. /// The TSS' `eip` should point to the handler function. diff --git a/kernel/src/paging/hierarchical_table.rs b/kernel/src/paging/hierarchical_table.rs index 48286cbd5..82931b09e 100644 --- a/kernel/src/paging/hierarchical_table.rs +++ b/kernel/src/paging/hierarchical_table.rs @@ -648,7 +648,7 @@ pub trait InactiveHierarchyTrait : TableHierarchy { /// These frames were marked as occupied when initialising the `FrameAllocator`, /// we're making them available again. /// - /// # Unsafety + /// # Safety /// /// Having multiple InactiveHierarchy pointing to the same table hierarchy is unsafe. /// Should not be used for any other purpose, it is only guaranteed to be safe to drop. diff --git a/kernel/src/process/thread_local_storage.rs b/kernel/src/process/thread_local_storage.rs index 78b46bd50..b38760ad7 100644 --- a/kernel/src/process/thread_local_storage.rs +++ b/kernel/src/process/thread_local_storage.rs @@ -165,7 +165,7 @@ impl TLSManager { /// Mark this TLS as free, so it can be re-used by future spawned thread. /// - /// # Unsafety + /// # Safety /// /// The TLS will be reassigned, so it must never be used again after calling this function. /// diff --git a/kernel/src/scheduler.rs b/kernel/src/scheduler.rs index ce3789e2f..8998c16bb 100644 --- a/kernel/src/scheduler.rs +++ b/kernel/src/scheduler.rs @@ -71,7 +71,7 @@ pub fn get_current_process() -> Arc { /// The passed function will be executed after setting the CURRENT_THREAD, but before /// setting it back to the RUNNING state. /// -/// # Unsafety +/// # Safety /// /// Interrupts must be disabled when calling this function. It will mutably borrow [`CURRENT_THREAD`], /// so we can't have interrupts on top of that which try to access it while it is borrowed mutably by us, @@ -339,7 +339,7 @@ where /// The passed function should take care to change the protection level, and ensure it cleans up all /// the registers before calling the EIP, in order to avoid leaking information to userspace. /// -/// # Unsafety: +/// # Safety: /// /// Interrupts must be off when calling this function. It will set [`CURRENT_THREAD`], and then /// turn them on, as we are running a new thread, no SpinLockIRQ is held. diff --git a/kernel/src/sync/spin_lock_irq.rs b/kernel/src/sync/spin_lock_irq.rs index f243df185..22d03c647 100644 --- a/kernel/src/sync/spin_lock_irq.rs +++ b/kernel/src/sync/spin_lock_irq.rs @@ -29,7 +29,7 @@ static INTERRUPT_DISABLE_COUNTER: AtomicU8 = AtomicU8::new(0); /// /// Look at documentation for [INTERRUPT_DISABLE_COUNTER] to know more. /// -/// # Unsafety: +/// # Safety /// /// Should be called in pairs with [disable_interrupts] or [decrement_lock_count], /// otherwise the counter will get out of sync and deadlocks will likely occur. @@ -44,7 +44,7 @@ pub unsafe fn enable_interrupts() { /// Used to decrement counter while keeping interrupts disabled before an iret. /// Look at documentation for [INTERRUPT_DISABLE_COUNTER] to know more. /// -/// # Unsafety: +/// # Safety /// /// Should be called in pairs with [enable_interrupts], /// otherwise the counter will get out of sync and deadlocks will likely occur. @@ -61,7 +61,7 @@ pub unsafe fn decrement_lock_count() { /// /// Look at documentation for [INTERRUPT_DISABLE_COUNTER] to know more. /// -/// # Unsafety: +/// # Safety /// /// Should be called in pairs with [enable_interrupts], /// otherwise the counter will get out of sync and deadlocks will likely occur.