forked from Rativel/BurritOS
Updated docs
This commit is contained in:
@@ -4,8 +4,6 @@ use crate::simulator::interrupt::InterruptStatus::InterruptOff;
|
||||
use crate::simulator::machine::Machine;
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
|
||||
use super::system::System;
|
||||
use super::thread_manager::ThreadManager;
|
||||
|
||||
/// Structure of a Semaphore used for synchronisation
|
||||
@@ -169,6 +167,8 @@ impl Lock {
|
||||
machine.interrupt.set_status(old_status);
|
||||
}
|
||||
|
||||
/// True if the current thread holds this lock.
|
||||
/// Useful for checking in Release, and in Condition operations below.
|
||||
pub fn held_by_current_thread(&mut self, thread_manager: &mut ThreadManager) -> bool {
|
||||
match &self.owner {
|
||||
Some(x) =>
|
||||
|
||||
Reference in New Issue
Block a user