Updated docs

This commit is contained in:
François Autin 2023-03-22 16:03:36 +01:00
parent 1b44949842
commit caddc445b8
No known key found for this signature in database
GPG Key ID: 343F5D382E1DD77C
2 changed files with 4 additions and 4 deletions

View File

@ -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 */
}

View File

@ -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) =>