From 7a00dff4b9cc31acfbd9474999208290b521d76b Mon Sep 17 00:00:00 2001 From: MunirG05 Date: Tue, 11 Jul 2023 13:30:45 +0530 Subject: [PATCH] fix the dumb --- kernel/src/scheduler.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/kernel/src/scheduler.rs b/kernel/src/scheduler.rs index 066bb531..cca1dfcf 100644 --- a/kernel/src/scheduler.rs +++ b/kernel/src/scheduler.rs @@ -7,9 +7,6 @@ use {crate::host::TrapHandler, hbvm::vm::Vm}; pub struct Scheduler<'a> { data: VecDeque>, - pub tick_callback: Option u64>, - pub last_timer_count: u64, - pub tick_limit: u64, } // NOTE: This is a very simple schduler and it sucks and should be replaced with a better one @@ -51,16 +48,5 @@ impl Scheduler<'_> { let mut prog = self.data.pop_front().unwrap(); prog.run().unwrap(); self.data.push_back(prog); - if self.tick_callback.is_some() { - let ret = self.tick_callback.unwrap()(); - if (ret - self.last_timer_count) >= self.tick_limit { - - return Some(0); - - } - } - break; - } - Some(1) } }