diff --git a/src/kernel/mod.rs b/src/kernel/mod.rs index c87b037..df9b60d 100644 --- a/src/kernel/mod.rs +++ b/src/kernel/mod.rs @@ -2,6 +2,6 @@ pub mod process; pub mod thread; pub mod mgerror; pub mod system; -mod synch; +pub mod synch; mod thread_manager; pub mod exception; \ No newline at end of file diff --git a/src/kernel/synch.rs b/src/kernel/synch.rs index 6fe22e3..f3682f3 100644 --- a/src/kernel/synch.rs +++ b/src/kernel/synch.rs @@ -1,5 +1,4 @@ use crate::utility::list::List; -use crate::utility::objaddr::*; use crate::kernel::thread::Thread; use crate::simulator::interrupt::InterruptStatus::InterruptOff; use crate::simulator::machine::Machine; @@ -17,8 +16,6 @@ pub struct Semaphore { } -impl SynchObj for Semaphore {} - impl Semaphore { /// Initializes a semaphore, so that it can be used for synchronization. @@ -92,8 +89,6 @@ pub struct Lock{ } -impl SynchObj for Lock {} - impl Lock { /// Initialize a Lock, so that it can be used for synchronization. @@ -198,8 +193,6 @@ pub struct Condition{ } -impl SynchObj for Condition {} - impl Condition { /// Initializes a Condition, so that it can be used for synchronization.