mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-07-10 22:43:25 +00:00
内核:在lib.rs中,将arch模块的路径进行更改,使得其他模块使用arch的代码时,不需要指定arch::x86_64 (#128)
This commit is contained in:
kernel/src
@ -10,8 +10,12 @@
|
||||
#[allow(non_snake_case)]
|
||||
use core::panic::PanicInfo;
|
||||
|
||||
/// 导出x86_64架构相关的代码,命名为arch模块
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
#[path = "arch/x86_64/mod.rs"]
|
||||
#[macro_use]
|
||||
mod arch;
|
||||
|
||||
#[macro_use]
|
||||
mod include;
|
||||
mod ipc;
|
||||
@ -25,13 +29,15 @@ mod sched;
|
||||
mod smp;
|
||||
mod time;
|
||||
|
||||
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
use mm::allocator::KernelAllocator;
|
||||
|
||||
// <3>
|
||||
use crate::{
|
||||
arch::x86_64::asm::current::current_pcb,
|
||||
arch::asm::current::current_pcb,
|
||||
include::bindings::bindings::{process_do_exit, BLACK, GREEN},
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user