📝 Updated utility mod documentation
This commit is contained in:
parent
33cbe77175
commit
ce4c7230f9
@ -1,3 +1,6 @@
|
|||||||
|
//! This module contains data type definitions used in other parts the BurritOS
|
||||||
|
//! They are separated from the rest of the operating system so as to promote
|
||||||
|
//! reusability and to separate data constructs proper from state and actions.
|
||||||
pub mod list;
|
pub mod list;
|
||||||
pub mod objaddr;
|
pub mod objaddr;
|
||||||
pub mod cfg;
|
pub mod cfg;
|
@ -17,9 +17,13 @@ use crate::kernel::{synch::{ Semaphore, Lock }, thread::Thread};
|
|||||||
/// calls.
|
/// calls.
|
||||||
#[derive(PartialEq)]
|
#[derive(PartialEq)]
|
||||||
pub struct ObjAddr {
|
pub struct ObjAddr {
|
||||||
|
/// Id of the last added object
|
||||||
last_id: i32,
|
last_id: i32,
|
||||||
|
/// List of [Semaphore] added in this struct. Each is keyed with a unique i32 id.
|
||||||
semaphores: HashMap<i32, Semaphore>,
|
semaphores: HashMap<i32, Semaphore>,
|
||||||
|
/// List of [Lock] added in this struct. Each is keyed with a unique i32 id.
|
||||||
locks: HashMap<i32, Lock>,
|
locks: HashMap<i32, Lock>,
|
||||||
|
/// List of threads known by this instance of ObjAddr (useful for managing lock ownership)
|
||||||
threads: HashMap<i32, Rc<RefCell<Thread>>>,
|
threads: HashMap<i32, Rc<RefCell<Thread>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user