diff --git a/src/kernel/system.rs b/src/kernel/system.rs index b3cb768..3e526f3 100644 --- a/src/kernel/system.rs +++ b/src/kernel/system.rs @@ -4,6 +4,18 @@ use crate::simulator::machine::Machine; use super::thread_manager::ThreadManager; +/// This macro properly initializes the system +#[macro_export] +macro_rules! init_system { + () => {{ + let m = Machine::init_machine(); + init_system!(m) + }}; + ($a:expr) => {{ + System::new($a) + }}; +} + /// # System /// /// This structure represents the state of the threads running on the operating system. @@ -71,16 +83,6 @@ mod tests { use crate::{System, Machine}; - macro_rules! init_system { - () => {{ - let m = Machine::init_machine(); - init_system!(m) - }}; - ($a:expr) => {{ - System::new($a) - }}; - } - #[test] fn test_init_system() { init_system!();