Fix module file name (interrupts.rs -> interrupts/mod.rs)

This commit is contained in:
Philipp Oppermann
2017-04-18 18:27:26 +02:00
parent 559e85a597
commit aac958a119

View File

@@ -62,7 +62,7 @@ So in order to prevent this triple fault, we need to either provide a handler fu
A double fault is a normal exception with an error code, so we can use our `handler_with_error_code` macro to create a wrapper function: A double fault is a normal exception with an error code, so we can use our `handler_with_error_code` macro to create a wrapper function:
{{< highlight rust "hl_lines=8 14" >}} {{< highlight rust "hl_lines=8 14" >}}
// in src/interrupts/mod.rs // in src/interrupts.rs
lazy_static! { lazy_static! {
static ref IDT: idt::Idt = { static ref IDT: idt::Idt = {
@@ -417,7 +417,7 @@ pub extern "C" fn rust_main(multiboot_information_address: usize) {
} }
// in src/interrupts/mod.rs // in src/interrupts.rs
use memory::MemoryController; use memory::MemoryController;
@@ -461,7 +461,7 @@ Let's create a new TSS that contains our double fault stack in its interrupt sta
[`TaskStateSegment` struct]: https://docs.rs/x86_64/0.1.1/x86_64/structures/tss/struct.TaskStateSegment.html [`TaskStateSegment` struct]: https://docs.rs/x86_64/0.1.1/x86_64/structures/tss/struct.TaskStateSegment.html
```rust ```rust
// in src/interrupts/mod.rs // in src/interrupts.rs
use x86_64::structures::tss::TaskStateSegment; use x86_64::structures::tss::TaskStateSegment;
``` ```
@@ -469,7 +469,7 @@ use x86_64::structures::tss::TaskStateSegment;
Let's create a new TSS in our `interrupts::init` function: Let's create a new TSS in our `interrupts::init` function:
{{< highlight rust "hl_lines=3 9 10" >}} {{< highlight rust "hl_lines=3 9 10" >}}
// in src/interrupts/mod.rs // in src/interrupts.rs
use x86_64::VirtualAddress; use x86_64::VirtualAddress;
@@ -504,7 +504,7 @@ We already created a GDT [when switching to long mode]. Back then, we used assem
[when switching to long mode]: {{% relref "02-entering-longmode.md#the-global-descriptor-table" %}} [when switching to long mode]: {{% relref "02-entering-longmode.md#the-global-descriptor-table" %}}
We start by creating a new `interrupts::gdt` submodule: We start by creating a new `interrupts::gdt` submodule. For that we need to rename the `src/interrupts.rs` file to `src/interrupts/mod.rs`. Then we can create a new submodule:
```rust ```rust
// in src/interrupts/mod.rs // in src/interrupts/mod.rs