Skeleton for architecture-specific things

master
ondra05 2022-11-07 21:21:16 +01:00
parent ed0c0ad43f
commit 41ee39e1b9
5 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1 @@
//!

16
kernel/src/arch/mod.rs Normal file
View 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",
);

View File

@ -0,0 +1 @@
//!

View File

@ -0,0 +1 @@
//!

View File

@ -7,6 +7,7 @@
extern crate alloc;
pub mod allocator;
pub mod arch;
pub mod task;
use versioning::Version;