Updated docs
This commit is contained in:
parent
1b44949842
commit
caddc445b8
@ -1,4 +1,4 @@
|
||||
|
||||
#![allow(unused, clippy::missing_docs_in_private_items)]
|
||||
/// Error enum, use it with Result<YourSucessStruct, **ErrorCode**>
|
||||
pub enum ErrorCode {
|
||||
IncError,
|
||||
@ -27,5 +27,5 @@ pub enum ErrorCode {
|
||||
WrongFileEndianess,
|
||||
NoAcia,
|
||||
|
||||
NUMMSGERROR /* Must always be last */
|
||||
NumMsgError /* Must always be last */
|
||||
}
|
@ -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) =>
|
||||
|
Loading…
Reference in New Issue
Block a user