Lint: remove some warnings
This commit is contained in:
@ -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() {
|
||||
|
Reference in New Issue
Block a user