reexport -> re-export

This commit is contained in:
Klemen Košir
2016-08-20 13:04:26 +02:00
parent e56df793d4
commit 30a8c06295
2 changed files with 3 additions and 3 deletions

View File

@@ -598,7 +598,7 @@ pub fn map_to<A>(page: Page, frame: Frame, flags: EntryFlags,
p1[page.p1_index()].set(frame, flags | PRESENT);
}
```
We add an reexport for all `entry` types since they are required to call the function. We assert that the page is unmapped and always set the present flag (since it wouldn't make sense to map a page without setting it).
We add an re-export for all `entry` types since they are required to call the function. We assert that the page is unmapped and always set the present flag (since it wouldn't make sense to map a page without setting it).
The `Table::next_table_create` method doesn't exist yet. It should return the next table if it exists, or create a new one. For the implementation we need the `FrameAllocator` from the [previous post] and the `Table::zero` method:
@@ -781,7 +781,7 @@ pub fn test_paging<A>(allocator: &mut A)
// test it
}
```
We borrow the frame allocator since we will need it for the mapping functions. To be able to call that function from main, we need to reexport it in `memory/mod.rs`:
We borrow the frame allocator since we will need it for the mapping functions. To be able to call that function from main, we need to re-export it in `memory/mod.rs`:
```rust
// in memory/mod.rs

View File

@@ -707,7 +707,7 @@ SECTIONS {
Instead of page aligning the `.multiboot_header` section, we merge it into the `.rodata` section. That way, we don't waste a whole page for the few bytes of the Multiboot header. We could merge it into any section, but `.rodata` fits best because it has the same flags (neither writable nor executable). The Multiboot header still needs to be at the beginning of the file, so `.rodata` must be our first section now.
### Testing it
Time to test it! We reexport the `remap_the_kernel` function from the memory module and call it from `rust_main`:
Time to test it! We re-export the `remap_the_kernel` function from the memory module and call it from `rust_main`:
```rust
// in src/memory/mod.rs