diff options
Diffstat (limited to 'src/sim/global_event.hh')
-rw-r--r-- | src/sim/global_event.hh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sim/global_event.hh b/src/sim/global_event.hh index 7b5fd7485..3a5297e78 100644 --- a/src/sim/global_event.hh +++ b/src/sim/global_event.hh @@ -91,6 +91,15 @@ class BaseGlobalEvent : public EventBase bool globalBarrier() { + // This method will be called from the process() method in + // the local barrier events + // (GlobalSyncEvent::BarrierEvent). The local event + // queues are always locked when servicing events (calling + // the process() method), which means that it will be + // locked when entering this method. We need to unlock it + // while waiting on the barrier to prevent deadlocks if + // another thread wants to lock the event queue. + EventQueue::ScopedRelease release(curEventQueue()); return _globalEvent->barrier->wait(); } |