From: Abdul Mutaal Ahmad Date: Tue, 15 Sep 2015 13:14:07 +0000 (-0500) Subject: misc: Bugfix for Freezing Terminal in SystemC Simulation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8dfa45e03cded21e071bb6e652ad9a8d9e0ef7b4;p=gem5.git 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 --- 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);