From 8dfa45e03cded21e071bb6e652ad9a8d9e0ef7b4 Mon Sep 17 00:00:00 2001 From: Abdul Mutaal Ahmad Date: Tue, 15 Sep 2015 08:14:07 -0500 Subject: misc: Bugfix for Freezing Terminal in SystemC Simulation If the terminal was used in the SystemC or TLM simulations the simulation gets in a deadlock state. This is because of the Event queue gets locked while servicing the async events leading to event queue deadlock. This was solved by locking the queue at the beginning of service of async events. Committed by: Nilay Vaish --- util/systemc/sc_module.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/util/systemc/sc_module.cc b/util/systemc/sc_module.cc index a47df8194..71b3b5fbb 100644 --- a/util/systemc/sc_module.cc +++ b/util/systemc/sc_module.cc @@ -140,6 +140,7 @@ void Module::serviceAsyncEvent() { EventQueue *eventq = getEventQueue(0); + std::lock_guard lock(*eventq); assert(async_event); -- cgit v1.2.3