summaryrefslogtreecommitdiff
path: root/src/sim/system.cc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-10-09 19:22:37 -0700
committerGabe Black <gabeblack@google.com>2019-10-25 22:42:31 +0000
commit6f42417144fe1a2e3ca37a3b419a57fc825030e2 (patch)
treea857312aba66445734db17ad91bdba047d1d1ab9 /src/sim/system.cc
parentb6d822c5c04a0ea441c66fcf0a736c81f07d17b9 (diff)
downloadgem5-6f42417144fe1a2e3ca37a3b419a57fc825030e2.tar.xz
sim: Make the System object a PCEventScope.
This abstracts away the raw PCEventQueue managed by the System. Change-Id: I04d773e6be90a891884a76841f15c3eecd5796ed Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22101 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/sim/system.cc')
-rw-r--r--src/sim/system.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/sim/system.cc b/src/sim/system.cc
index 3868f57b8..7b8ca87e3 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -292,6 +292,20 @@ System::registerThreadContext(ThreadContext *tc, ContextID assigned)
return id;
}
+#if THE_ISA != NULL_ISA
+bool
+System::schedule(PCEvent *event)
+{
+ return pcEventQueue.schedule(event);
+}
+
+bool
+System::remove(PCEvent *event)
+{
+ return pcEventQueue.remove(event);
+}
+#endif
+
int
System::numRunningContexts()
{