A few documentation updates

This commit is contained in:
François Autin 2023-03-14 15:16:40 +01:00
parent 81f3ac2099
commit 4ee0c11c56
No known key found for this signature in database
GPG Key ID: 343F5D382E1DD77C
2 changed files with 13 additions and 4 deletions

View File

@ -6,17 +6,26 @@ use super::{scheduler::Scheduler, thread::Thread, system::System, mgerror::Error
pub const SIMULATORSTACKSIZE: usize = 32 * 1024;
/// # Thread manager
///
/// An instance of this struct is responsible for managing threads on behalf of the system
#[derive(PartialEq)]
pub struct ThreadManager {
/// Current running thread
pub g_current_thread: Option<Rc<RefCell<Thread>>>,
/// The thread to be destroyed next
pub g_thread_to_be_destroyed: Option<Rc<RefCell<Thread>>>,
/// The list of alive threads
pub g_alive: List<Rc<RefCell<Thread>>>,
/// The thread scheduler
pub g_scheduler: Scheduler,
/// The system owning the thread manager
pub system: Option<Rc<RefCell<System>>>
}
impl ThreadManager {
/// Thread manager constructor
pub fn new() -> Self {
Self {
g_current_thread: Option::None,