|
|
@ -1,7 +1,8 @@
|
|
|
|
pub use arch::paging::*;
|
|
|
|
pub use arch::paging::*;
|
|
|
|
use bit_allocator::{BitAlloc, BitAlloc4K, BitAlloc64K};
|
|
|
|
use bit_allocator::{BitAlloc, BitAlloc4K, BitAlloc64K};
|
|
|
|
use consts::MEMORY_OFFSET;
|
|
|
|
use consts::MEMORY_OFFSET;
|
|
|
|
use spin::{Mutex, MutexGuard};
|
|
|
|
use sync::{MutexGuard, Spin};
|
|
|
|
|
|
|
|
use sync::SpinLock as Mutex;
|
|
|
|
use super::HEAP_ALLOCATOR;
|
|
|
|
use super::HEAP_ALLOCATOR;
|
|
|
|
use ucore_memory::{*, paging::PageTable};
|
|
|
|
use ucore_memory::{*, paging::PageTable};
|
|
|
|
use ucore_memory::cow::CowExt;
|
|
|
|
use ucore_memory::cow::CowExt;
|
|
|
@ -48,7 +49,7 @@ lazy_static! {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// The only way to get active page table
|
|
|
|
/// The only way to get active page table
|
|
|
|
pub fn active_table() -> MutexGuard<'static, CowExt<ActivePageTable>> {
|
|
|
|
pub fn active_table() -> MutexGuard<'static, CowExt<ActivePageTable>, Spin> {
|
|
|
|
ACTIVE_TABLE.lock()
|
|
|
|
ACTIVE_TABLE.lock()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|