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 <nilay@cs.wisc.edu>
This commit is contained in:
Abdul Mutaal Ahmad 2015-09-15 08:14:07 -05:00
parent 1bb6a100ab
commit 8dfa45e03c

View file

@ -140,6 +140,7 @@ void
Module::serviceAsyncEvent()
{
EventQueue *eventq = getEventQueue(0);
std::lock_guard<EventQueue> lock(*eventq);
assert(async_event);