Skip to content

Commit 950a941

Browse files
authored
Merge pull request #432 from xzmeng/fix-misc-doc-typos
Fix misc doc typos
2 parents 41a10bb + be82fe9 commit 950a941

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

Changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
- This trait is only available on nightly.
3434
- Gated behind `step_trait` feature flag
3535
- Add `UCet` and `SCet` registers ([#349](https://github.com/rust-osdev/x86_64/pull/349))
36-
- Use [`rustversion`](https://crates.io/crates/rustversion) to mark certian functions `const fn` on Rust 1.61 ([#353](https://github.com/rust-osdev/x86_64/pull/353))
36+
- Use [`rustversion`](https://crates.io/crates/rustversion) to mark certain functions `const fn` on Rust 1.61 ([#353](https://github.com/rust-osdev/x86_64/pull/353))
3737
- `Entry::handler_addr()` is now public ([#354](https://github.com/rust-osdev/x86_64/pull/354))
3838
- Increase packed structure alignment ([#362](https://github.com/rust-osdev/x86_64/pull/362))
3939
- Make more address methods `const fn` ([#369](https://github.com/rust-osdev/x86_64/pull/369))

src/instructions/interrupts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ where
109109
/// On some processors, the interrupt shadow of `sti` does not apply to
110110
/// non-maskable interrupts (NMIs). This means that an NMI can occur between
111111
/// the `sti` and `hlt` instruction, with the result that the CPU is put to
112-
/// sleep even though a new interrupt occured.
112+
/// sleep even though a new interrupt occurred.
113113
///
114114
/// To work around this, it is recommended to check in the NMI handler if
115-
/// the interrupt occured between `sti` and `hlt` instructions. If this is the
115+
/// the interrupt occurred between `sti` and `hlt` instructions. If this is the
116116
/// case, the handler should increase the instruction pointer stored in the
117117
/// interrupt stack frame so that the `hlt` instruction is skipped.
118118
///

src/registers/rflags.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ bitflags! {
2828
const ALIGNMENT_CHECK = 1 << 18;
2929
/// Enable the virtual-8086 mode.
3030
const VIRTUAL_8086_MODE = 1 << 17;
31-
/// Allows to restart an instruction following an instrucion breakpoint.
31+
/// Allows to restart an instruction following an instruction breakpoint.
3232
const RESUME_FLAG = 1 << 16;
3333
/// Used by `iret` in hardware task switch mode to determine if current task is nested.
3434
const NESTED_TASK = 1 << 14;

src/structures/idt.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use volatile::Volatile;
3636
/// first entry, the entry for the `divide_error` exception. Note that the index access is
3737
/// not possible for entries for which an error code is pushed.
3838
///
39-
/// The remaining entries are used for interrupts. They can be accesed through index
39+
/// The remaining entries are used for interrupts. They can be accessed through index
4040
/// operations on the idt, e.g. `idt[32]` returns the first interrupt entry, which is the 32nd IDT
4141
/// entry).
4242
///
@@ -1271,7 +1271,7 @@ macro_rules! set_general_handler {
12711271
#[macro_export]
12721272
#[doc(hidden)]
12731273
/// We can't loop in macros, but we can use recursion.
1274-
/// This macro recursivly adds one more bit to it's arguments until we have 8 bits so that we can call set_general_handler_entry.
1274+
/// This macro recursively adds one more bit to it's arguments until we have 8 bits so that we can call set_general_handler_entry.
12751275
macro_rules! set_general_handler_recursive_bits {
12761276
// if we have 8 all bits, construct the index from the bits, check if the entry is in range and invoke the macro that sets the handler
12771277
($idt:expr, $handler:ident, $range:expr, $bit7:tt, $bit6:tt, $bit5:tt, $bit4:tt, $bit3:tt, $bit2:tt, $bit1:tt, $bit0:tt) => {{
@@ -1282,7 +1282,7 @@ macro_rules! set_general_handler_recursive_bits {
12821282
$crate::set_general_handler_entry!($idt, $handler, IDX, $bit7, $bit6, $bit5, $bit4, $bit3, $bit2, $bit1, $bit0);
12831283
}
12841284
}};
1285-
// otherwise recursivly invoke the macro adding one more bit
1285+
// otherwise recursively invoke the macro adding one more bit
12861286
($idt:expr, $handler:ident, $range:expr $(, $bits:tt)*) => {
12871287
$crate::set_general_handler_recursive_bits!($idt, $handler, $range $(, $bits)*, 0);
12881288
$crate::set_general_handler_recursive_bits!($idt, $handler, $range $(, $bits)*, 1);

src/structures/paging/mapper/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub enum TranslateResult {
6060
Mapped {
6161
/// The mapped frame.
6262
frame: MappedFrame,
63-
/// The offset whithin the mapped frame.
63+
/// The offset within the mapped frame.
6464
offset: u64,
6565
/// The entry flags in the lowest-level page table.
6666
///
@@ -136,7 +136,7 @@ pub trait Mapper<S: PageSize> {
136136
/// the same physical address. This is undefined behavior in Rust.
137137
/// - This can be ensured by mapping each page to an individual physical
138138
/// frame that is not mapped anywhere else.
139-
/// - Creating uninitalized or invalid values: Rust requires that all values
139+
/// - Creating uninitialized or invalid values: Rust requires that all values
140140
/// have a correct memory layout. For example, a `bool` must be either a 0
141141
/// or a 1 in memory, but not a 3 or 4. An exception is the `MaybeUninit`
142142
/// wrapper type, which abstracts over possibly uninitialized memory.
@@ -224,7 +224,7 @@ pub trait Mapper<S: PageSize> {
224224
/// the same physical address. This is undefined behavior in Rust.
225225
/// - This can be ensured by mapping each page to an individual physical
226226
/// frame that is not mapped anywhere else.
227-
/// - Creating uninitalized or invalid values: Rust requires that all values
227+
/// - Creating uninitialized or invalid values: Rust requires that all values
228228
/// have a correct memory layout. For example, a `bool` must be either a 0
229229
/// or a 1 in memory, but not a 3 or 4. An exception is the `MaybeUninit`
230230
/// wrapper type, which abstracts over possibly uninitialized memory.

src/structures/paging/page.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ pub struct PageRangeInclusive<S: PageSize = Size4KiB> {
357357
}
358358

359359
impl<S: PageSize> PageRangeInclusive<S> {
360-
/// Returns wether this range contains no pages.
360+
/// Returns whether this range contains no pages.
361361
#[inline]
362362
pub fn is_empty(&self) -> bool {
363363
self.start > self.end

0 commit comments

Comments
 (0)