Fix scheduler switch_to by making a lot of change(use smart pointers in place of lifetime reference)

This commit is contained in:
Quentin Legot
2023-03-13 21:47:06 +01:00
parent 39e26e61bb
commit 7de7f2e007
5 changed files with 71 additions and 55 deletions

View File

@ -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);
}