1
0
forked from Rativel/BurritOS

Fix exceptions with semaphore

This commit is contained in:
Quentin Legot
2023-04-12 14:49:08 +02:00
parent 134e2bd2cc
commit 21f3a72a3d
5 changed files with 64 additions and 25 deletions

View File

@@ -3,7 +3,6 @@
//! Module containing structs and methods pertaining to the state of the operating system
use super::{thread_manager::ThreadManager};
use crate::utility::objaddr::ObjAddr;
/// # System
///
@@ -16,8 +15,7 @@ use crate::utility::objaddr::ObjAddr;
/// - The thread to be destroyed next
/// - The scheduler which acts upon these threads
pub struct System {
thread_manager: ThreadManager,
obj_addrs: ObjAddr
thread_manager: ThreadManager
}
impl System {
@@ -28,14 +26,12 @@ impl System {
&mut self.thread_manager
}
pub fn get_obj_addrs(&mut self) -> &mut ObjAddr { &mut self.obj_addrs }
}
impl Default for System {
/// System constructor
fn default() -> Self {
Self { thread_manager: ThreadManager::new(), obj_addrs: ObjAddr::init() }
Self { thread_manager: ThreadManager::new() }
}
}