forked from AbleOS/ableos
Skeleton for architecture-specific things
This commit is contained in:
parent
4812e59c09
commit
f396c3642d
1
kernel/src/arch/aarch64/mod.rs
Normal file
1
kernel/src/arch/aarch64/mod.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
//!
|
16
kernel/src/arch/mod.rs
Normal file
16
kernel/src/arch/mod.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
//! Architecture specific code
|
||||||
|
|
||||||
|
macro_rules! arch_cond {
|
||||||
|
($($arch:ident: $str:literal),* $(,)?) => {$(
|
||||||
|
#[cfg(target_arch = $str)]
|
||||||
|
pub mod $arch;
|
||||||
|
#[cfg(target_arch = $str)]
|
||||||
|
pub use $arch::*;
|
||||||
|
)*};
|
||||||
|
}
|
||||||
|
|
||||||
|
arch_cond!(
|
||||||
|
aarch64: "aarch64",
|
||||||
|
riscv64: "riscv64",
|
||||||
|
x86_64: "x86_64",
|
||||||
|
);
|
1
kernel/src/arch/riscv64/mod.rs
Normal file
1
kernel/src/arch/riscv64/mod.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
//!
|
1
kernel/src/arch/x86_64/mod.rs
Normal file
1
kernel/src/arch/x86_64/mod.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
//!
|
|
@ -7,6 +7,7 @@
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
|
|
||||||
pub mod allocator;
|
pub mod allocator;
|
||||||
|
pub mod arch;
|
||||||
pub mod task;
|
pub mod task;
|
||||||
|
|
||||||
use versioning::Version;
|
use versioning::Version;
|
||||||
|
|
Loading…
Reference in a new issue