e
This commit is contained in:
FantasyPvP
2023-03-11 02:06:02 +00:00
parent e491435dea
commit 90d36d0471
4 changed files with 103 additions and 34 deletions
-16
View File
@@ -1,16 +0,0 @@
use lazy_static::lazy_static;
use spin::Mutex;
use alloc::{string::String};
lazy_static! {
pub static ref OS: Mutex<SysInfo> = Mutex::new(SysInfo {
os: String::from("CrystalOS Alpha"),
version: String::from("0.2.1"),
});
}
pub struct SysInfo {
pub os: String,
pub version: String,
}
+3 -5
View File
@@ -50,11 +50,9 @@ impl Executor {
}
}
pub fn run(&mut self) -> ! {
loop {
self.run_ready_tasks();
self.sleep_if_idle();
}
pub fn try_run(&mut self) {
self.run_ready_tasks();
self.sleep_if_idle();
}
fn sleep_if_idle(&self) {