diff options
Diffstat (limited to 'src/sim/simulate.cc')
-rw-r--r-- | src/sim/simulate.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sim/simulate.cc b/src/sim/simulate.cc index b60b8a783..426c3e662 100644 --- a/src/sim/simulate.cc +++ b/src/sim/simulate.cc @@ -198,6 +198,9 @@ doSimLoop(EventQueue *eventq) } if (async_event && testAndClearAsyncEvent()) { + // Take the event queue lock in case any of the service + // routines want to schedule new events. + std::lock_guard<EventQueue> lock(*eventq); async_event = false; if (async_statdump || async_statreset) { Stats::schedStatEvent(async_statdump, async_statreset); |