Add debug field to thread_manager and tried to fix sc_join (not worked :-( )

This commit is contained in:
2023-04-13 02:05:21 +02:00
parent f144438490
commit 232617c32e
6 changed files with 44 additions and 35 deletions

View File

@@ -233,7 +233,7 @@ mod test {
#[test]
fn test_lock_simple() {
let mut machine = Machine::new(true);
let mut tm = ThreadManager::new();
let mut tm = ThreadManager::new(true);
let thread = Rc::new(RefCell::new(Thread::new("test_lock")));
tm.ready_to_run(Rc::clone(&thread));
tm.set_g_current_thread(Some(Rc::clone(&thread)));
@@ -255,7 +255,7 @@ mod test {
let thread2 = Rc::new(RefCell::new(Thread::new("test_lock2")));
let mut machine = Machine::new(true);
let mut tm = ThreadManager::new();
let mut tm = ThreadManager::new(true);
tm.ready_to_run(Rc::clone(&thread1));
tm.ready_to_run(Rc::clone(&thread2));