Earl Ou has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/67533?usp=email )
Change subject: sim: handle async events in main thread only
......................................................................
sim: handle async events in main thread only
Change-Id: Iddd512235e84e9d77f60985bb1771aa4cc693004
---
M src/sim/simulate.cc
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/sim/simulate.cc b/src/sim/simulate.cc
index 86d516d..78ba33a 100644
--- a/src/sim/simulate.cc
+++ b/src/sim/simulate.cc
@@ -307,6 +307,8 @@
curEventQueue(eventq);
eventq->handleAsyncInsertions();
+ bool mainQueue = eventq == getEventQueue(0);
+
while (1) {
// there should always be at least one event (the SimLoopExitEvent
// we just scheduled) in the queue
@@ -314,7 +316,7 @@
assert(curTick() <= eventq->nextTick() &&
"event scheduled in the past");
- if (async_event && testAndClearAsyncEvent()) {
+ if (mainQueue && 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);
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/67533?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Iddd512235e84e9d77f60985bb1771aa4cc693004
Gerrit-Change-Number: 67533
Gerrit-PatchSet: 1
Gerrit-Owner: Earl Ou <shunhsin...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org