Fix scheduler switch_to by making a lot of change(use smart pointers in place of lifetime reference)
This commit is contained in:
@ -13,11 +13,14 @@ mod kernel;
|
||||
/// module containing useful tools which can be use in most part of the OS to ease the development of the OS
|
||||
pub mod utility;
|
||||
|
||||
use std::{rc::Rc, cell::RefCell};
|
||||
|
||||
use kernel::system::System;
|
||||
use simulator::machine::Machine;
|
||||
|
||||
fn main() {
|
||||
let machine = Machine::init_machine();
|
||||
let mut system = System::new(machine);
|
||||
system.freeze();
|
||||
let system = Rc::new(RefCell::new(System::new(machine)));
|
||||
|
||||
System::freeze(system);
|
||||
}
|
||||
|
Reference in New Issue
Block a user