📝 Updated utility mod documentation

This commit is contained in:
François Autin
2023-04-21 14:50:55 +02:00
parent 33cbe77175
commit ce4c7230f9
2 changed files with 7 additions and 0 deletions

View File

@ -17,9 +17,13 @@ use crate::kernel::{synch::{ Semaphore, Lock }, thread::Thread};
/// calls.
#[derive(PartialEq)]
pub struct ObjAddr {
/// Id of the last added object
last_id: i32,
/// List of [Semaphore] added in this struct. Each is keyed with a unique i32 id.
semaphores: HashMap<i32, Semaphore>,
/// List of [Lock] added in this struct. Each is keyed with a unique i32 id.
locks: HashMap<i32, Lock>,
/// List of threads known by this instance of ObjAddr (useful for managing lock ownership)
threads: HashMap<i32, Rc<RefCell<Thread>>>,
}