lint: remove some warning

This commit is contained in:
2023-04-12 15:32:46 +02:00
parent 752b70e448
commit 35736821c0
8 changed files with 14 additions and 35 deletions

View File

@@ -142,6 +142,7 @@ impl Lock {
}
/// Structure of a condition used for synchronisation
#[allow(unused)] // -> No enough time to implement it
pub struct Condition{
/// The queue of threads waiting for execution
@@ -155,6 +156,7 @@ impl Condition {
///
/// ### Parameters
/// - *thread_manager* Thread manager which managing threads
#[allow(unused)]
pub fn new() -> Condition {
Condition{ waiting_queue: List::default()}
}
@@ -165,6 +167,7 @@ impl Condition {
/// ### Parameters
/// - **current_thread** the current thread
/// - **machine** the machine where threads are executed
#[allow(unused)]
pub fn wait(&mut self, machine: &mut Machine, thread_manager: &mut ThreadManager) {
let old_status = machine.interrupt.set_status(InterruptOff);
match thread_manager.get_g_current_thread() {
@@ -186,6 +189,7 @@ impl Condition {
/// ### Parameters
/// - **machine** the machine where the code is executed
/// - **scheduler** the scheduler which determine which thread to execute
#[allow(unused)]
pub fn signal(&mut self, machine: &mut Machine, thread_manager: &mut ThreadManager) {
let old_status = machine.interrupt.set_status(InterruptOff);
@@ -204,6 +208,7 @@ impl Condition {
/// ### Parameters
/// - **machine** the machine where the code is executed
/// - **scheduler** the scheduler which determine which thread to execute
#[allow(unused)]
pub fn broadcast(&mut self, machine: &mut Machine, thread_manager: &mut ThreadManager) {
let old_status = machine.interrupt.set_status(InterruptOff);