Browse Source

memory::init(): double-call guard

master
3moon 8 years ago
parent
commit
242b218e47
2 changed files with 4 additions and 0 deletions
  1. +2
    -0
      src/arch/x86_64/memory/mod.rs
  2. +2
    -0
      src/lib.rs

+ 2
- 0
src/arch/x86_64/memory/mod.rs View File

@ -79,6 +79,8 @@ pub trait FrameAllocator {
pub fn init(boot_info: &BootInformation) { pub fn init(boot_info: &BootInformation) {
assert_first_call!("memory::init() can only be called once!");
let memory_map_tag = boot_info.memory_map_tag() let memory_map_tag = boot_info.memory_map_tag()
.expect("multiboot: Memory map tag required"); .expect("multiboot: Memory map tag required");
let elf_sections_tag = boot_info.elf_sections_tag() let elf_sections_tag = boot_info.elf_sections_tag()


+ 2
- 0
src/lib.rs View File

@ -7,6 +7,8 @@
#[macro_use] #[macro_use]
extern crate log; extern crate log;
#[macro_use]
extern crate once;
extern crate rlibc; extern crate rlibc;
extern crate spin; extern crate spin;
extern crate volatile; extern crate volatile;


Loading…
Cancel
Save