summaryrefslogtreecommitdiff
path: root/src/sim/eventq.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/eventq.cc')
-rw-r--r--src/sim/eventq.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sim/eventq.cc b/src/sim/eventq.cc
index 0735a011b..b8e45a13e 100644
--- a/src/sim/eventq.cc
+++ b/src/sim/eventq.cc
@@ -203,6 +203,7 @@ EventQueue::remove(Event *event)
Event *
EventQueue::serviceOne()
{
+ std::lock_guard<EventQueue> lock(*this);
Event *event = head;
Event *next = head->nextInBin;
event->flags.clear(Event::Scheduled);