lint: remove some warning
This commit is contained in:
@ -2,7 +2,7 @@ use std::{rc::Rc, cell::{RefCell, Ref}};
|
||||
|
||||
use crate::{utility::{list::List, objaddr::ObjAddr}, simulator::{machine::{NUM_INT_REGS, NUM_FP_REGS, Machine}, interrupt::InterruptStatus, error::{MachineOk, MachineError}}};
|
||||
|
||||
use super::{thread::Thread, process::Process, synch::Semaphore};
|
||||
use super::{thread::Thread, process::Process};
|
||||
|
||||
pub const SIMULATORSTACKSIZE: usize = 32 * 1024;
|
||||
|
||||
@ -273,7 +273,7 @@ impl ThreadManager {
|
||||
mod test {
|
||||
use std::{rc::Rc, cell::RefCell};
|
||||
|
||||
use crate::{simulator::{machine::Machine, loader}, kernel::{system::System, thread::Thread, process::Process, thread_manager::{ThreadManager, self}, synch::Semaphore}};
|
||||
use crate::{simulator::{machine::Machine, loader}, kernel::{system::System, thread::Thread, process::Process, thread_manager::ThreadManager, synch::Semaphore}};
|
||||
|
||||
#[test]
|
||||
fn test_thread_context() {
|
||||
@ -334,7 +334,7 @@ mod test {
|
||||
// Init
|
||||
let mut tm = ThreadManager::new();
|
||||
let mut machine = Machine::new(true);
|
||||
let mut semaphore = Semaphore::new(2);
|
||||
let semaphore = Semaphore::new(2);
|
||||
let sema_id = tm.get_obj_addrs().add_semaphore(semaphore);
|
||||
let thread1 = Rc::new(RefCell::new(Thread::new("test_semaphore_1")));
|
||||
let thread2 = Rc::new(RefCell::new(Thread::new("test_semaphore_2")));
|
||||
|
Reference in New Issue
Block a user