Global allocator, page table - protected by spinlock

This commit is contained in:
Jeremy Soller 2016-08-15 16:29:54 -06:00
parent 617516b949
commit fda1ab2327
4 changed files with 46 additions and 32 deletions

View file

@ -10,11 +10,13 @@
#![no_std]
extern crate hole_list_allocator as allocator;
#[macro_use]
extern crate bitflags;
extern crate spin;
extern crate x86;
use spin::Mutex;
/// Print to console
#[macro_export]
macro_rules! print {
@ -106,3 +108,6 @@ pub mod start;
/// Task state segment
pub mod tss;
pub static ALLOCATOR: Mutex<Option<memory::AreaFrameAllocator>> = Mutex::new(None);
pub static PAGE_TABLE: Mutex<Option<paging::ActivePageTable>> = Mutex::new(None);