diff --git a/kernel/src/arch/x86_64/driver/vga.rs b/kernel/src/arch/x86_64/driver/vga.rs index 7ef8720..a5b2feb 100644 --- a/kernel/src/arch/x86_64/driver/vga.rs +++ b/kernel/src/arch/x86_64/driver/vga.rs @@ -1,7 +1,7 @@ use consts::KERNEL_OFFSET; use core::ptr::Unique; use core::fmt; -use spin::Mutex; +use sync::SpinLock as Mutex; use volatile::Volatile; use x86_64::instructions::port::Port; use logging::Color; diff --git a/kernel/src/fs.rs b/kernel/src/fs.rs index fe20c6c..6c9c958 100644 --- a/kernel/src/fs.rs +++ b/kernel/src/fs.rs @@ -2,7 +2,7 @@ use simple_filesystem::*; use alloc::boxed::Box; #[cfg(target_arch = "x86_64")] use arch::driver::ide; -use spin::Mutex; +use sync::SpinLock as Mutex; // Hard link user program #[cfg(target_arch = "riscv32")] diff --git a/kernel/src/memory.rs b/kernel/src/memory.rs index 0f203f3..dec17fb 100644 --- a/kernel/src/memory.rs +++ b/kernel/src/memory.rs @@ -1,7 +1,8 @@ pub use arch::paging::*; use bit_allocator::{BitAlloc, BitAlloc4K, BitAlloc64K}; use consts::MEMORY_OFFSET; -use spin::{Mutex, MutexGuard}; +use sync::{MutexGuard, Spin}; +use sync::SpinLock as Mutex; use super::HEAP_ALLOCATOR; use ucore_memory::{*, paging::PageTable}; use ucore_memory::cow::CowExt; @@ -48,7 +49,7 @@ lazy_static! { } /// The only way to get active page table -pub fn active_table() -> MutexGuard<'static, CowExt> { +pub fn active_table() -> MutexGuard<'static, CowExt, Spin> { ACTIVE_TABLE.lock() }