1
0
forked from Rativel/BurritOS

kernel now build

I commented out semaphore code too cause it need to be updated
and having some error cause the compiler to not check for borrow errors
This commit is contained in:
Quentin Legot
2023-03-16 14:52:53 +01:00
parent fa64d4314d
commit 977cb2bf96
5 changed files with 206 additions and 241 deletions

View File

@@ -2,11 +2,9 @@
//!
//! Module containing structs and methods pertaining to the state of the operating system
use std::{cell::RefCell, rc::Rc};
use crate::simulator::machine::Machine;
use super::{thread_manager::ThreadManager, thread::Thread};
use super::{thread_manager::ThreadManager};
/// This macro properly initializes the system
#[macro_export]
@@ -46,13 +44,6 @@ impl System {
}
}
/// Sets a thread asleep
///
pub fn thread_sleep(&mut self, thread: Rc<RefCell<Thread>>) {
let machine = self.get_machine();
self.thread_manager.thread_sleep(machine, thread);
}
// GETTERS
/// Returns the Machine
@@ -88,7 +79,7 @@ pub enum ObjectType {
#[cfg(test)]
mod tests {
use crate::{System, Machine};
use crate::Machine;
#[test]
fn test_init_system() {