Lint: remove some warnings

This commit is contained in:
Quentin Legot
2023-04-06 13:46:59 +02:00
parent 9cc57e7f03
commit 66d6daf0b9
6 changed files with 16 additions and 68 deletions

View File

@ -2,7 +2,7 @@ use std::{rc::Rc, cell::{RefCell, Ref}};
use crate::{utility::list::List, simulator::{machine::{NUM_INT_REGS, NUM_FP_REGS, Machine}, interrupt::InterruptStatus}};
use super::{thread::Thread, mgerror::ErrorCode, process::Process};
use super::{thread::Thread, process::Process};
pub const SIMULATORSTACKSIZE: usize = 32 * 1024;
@ -92,8 +92,6 @@ impl ThreadManager {
thread_m.process = Option::Some(owner);
let ptr = sp_loc; // todo addrspace
thread_m.init_thread_context(func_pc, ptr, argument);
let base_stack_addr: [i8; SIMULATORSTACKSIZE] = [0; SIMULATORSTACKSIZE]; // todo AllocBoundedArray
thread_m.init_simulator_context(base_stack_addr);
thread_m.process.as_mut().unwrap().num_thread += 1;
self.get_g_alive().push(Rc::clone(&thread));
self.ready_to_run(Rc::clone(&thread));
@ -202,7 +200,7 @@ impl ThreadManager {
mod test {
use std::{rc::Rc, cell::RefCell};
use crate::{simulator::{machine::Machine, loader}, kernel::{system::System, thread::{Thread, self}, process::Process}};
use crate::{simulator::{machine::Machine, loader}, kernel::{system::System, thread::Thread, process::Process}};
#[test]
fn test_thread_context() {