added lock acquire system call
This commit is contained in:
@@ -37,11 +37,11 @@ impl Semaphore {
|
||||
pub struct Lock {
|
||||
|
||||
/// Thread owning the lock
|
||||
owner: Option<Rc<RefCell<Thread>>>,
|
||||
pub owner: Option<Rc<RefCell<Thread>>>,
|
||||
/// The queue of threads waiting for execution
|
||||
waiting_queue:List<Rc<RefCell<Thread>>>,
|
||||
pub waiting_queue:List<Rc<RefCell<Thread>>>,
|
||||
/// A boolean definig if the lock is free or not
|
||||
free: bool
|
||||
pub free: bool
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user