1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-22 16:16:16 +04:00

Remove unnecessary lazy_static

This commit is contained in:
equation314 2019-10-05 13:02:43 +08:00
parent 9f6cb5966d
commit 3069e17d78
3 changed files with 4 additions and 10 deletions

View File

@ -4,12 +4,10 @@ use super::paging::MMIOType;
use crate::consts::{KERNEL_OFFSET, MEMORY_OFFSET};
use crate::memory::{init_heap, kernel_offset, Linear, MemoryAttr, MemorySet, FRAME_ALLOCATOR};
use log::*;
use spin::Mutex;
use rcore_memory::PAGE_SIZE;
use spin::Mutex;
lazy_static! {
static ref KERNEL_MEMORY_SET: Mutex<Option<MemorySet>> = Mutex::new(None);
}
static KERNEL_MEMORY_SET: Mutex<Option<MemorySet>> = Mutex::new(None);
/// Memory initialization.
pub fn init() {

View File

@ -7,9 +7,7 @@ use spin::Mutex;
// Console -> TextBuffer -> FrameBuffer
type RCoreConsole = ConsoleOnGraphic<Framebuffer>;
lazy_static! {
pub static ref CONSOLE: Mutex<Option<RCoreConsole>> = Mutex::new(None);
}
pub static CONSOLE: Mutex<Option<RCoreConsole>> = Mutex::new(None);
/// Initialize console driver
pub fn init() {

View File

@ -295,9 +295,7 @@ impl ColorEncode for Rgb888 {
}
}
lazy_static! {
pub static ref FRAME_BUFFER: Mutex<Option<Framebuffer>> = Mutex::new(None);
}
pub static FRAME_BUFFER: Mutex<Option<Framebuffer>> = Mutex::new(None);
/// Initialize framebuffer
///