1
0
Fork 0
forked from AbleOS/ableos
ableos-idl/kernel/src/scheduler.rs

23 lines
683 B
Rust
Raw Normal View History

2023-06-26 18:42:55 -05:00
use {crate::host::TrapHandler, alloc::vec::Vec, hbvm::vm::Vm};
2023-06-26 07:55:37 -05:00
pub struct Scheduler<'a> {
data: Vec<Vm<'a, TrapHandler>>,
}
impl Scheduler<'_> {
2023-06-26 18:42:55 -05:00
// fn new_process(&mut self, program: Vec<u8>) {
// let prog = program.clone();
// #[allow(clippy::redundant_else)]
// if let Err(e) = validate(&prog) {
// log::error!("Program validation error: {e:?}");
// } else {
// log::info!("valid program");
// unsafe {
// let mut vm = Vm::new_unchecked(&prog, TrapHandler);
// vm.memory.insert_test_page();
// self.data.push(vm);
// }
// }
// }
2023-06-26 07:55:37 -05:00
}