summaryrefslogtreecommitdiff
path: root/src/arch/x86/interrupts.cc
diff options
context:
space:
mode:
authorSean Wilson <spwilson2@wisc.edu>2017-06-16 16:48:36 -0500
committerSean Wilson <spwilson2@wisc.edu>2017-07-12 20:07:05 +0000
commit1b7bf4ed75b55fdfc55d901775c837377268b661 (patch)
treea90aa814054c64598a13a233e93aa373bb4ef442 /src/arch/x86/interrupts.cc
parent373054232eb5b0dcb3b76c3f6090b08160f10fac (diff)
downloadgem5-1b7bf4ed75b55fdfc55d901775c837377268b661.tar.xz
mips, x86: Refactor some Event subclasses into lambdas
Change-Id: I09570e569efe55f5502bc201e03456738999e714 Signed-off-by: Sean Wilson <spwilson2@wisc.edu> Reviewed-on: https://gem5-review.googlesource.com/3920 Maintainer: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/arch/x86/interrupts.cc')
-rw-r--r--src/arch/x86/interrupts.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/arch/x86/interrupts.cc b/src/arch/x86/interrupts.cc
index b869a929e..0ef79a472 100644
--- a/src/arch/x86/interrupts.cc
+++ b/src/arch/x86/interrupts.cc
@@ -588,7 +588,7 @@ X86ISA::Interrupts::setReg(ApicRegIndex reg, uint32_t val)
X86ISA::Interrupts::Interrupts(Params * p)
: BasicPioDevice(p, PageBytes), IntDevice(this, p->int_latency),
- apicTimerEvent(this),
+ apicTimerEvent([this]{ processApicTimerEvent(); }, name()),
pendingSmi(false), smiVector(0),
pendingNmi(false), nmiVector(0),
pendingExtInt(false), extIntVector(0),
@@ -767,3 +767,9 @@ X86LocalApicParams::create()
{
return new X86ISA::Interrupts(this);
}
+
+void
+X86ISA::Interrupts::processApicTimerEvent() {
+ if (triggerTimerInterrupt())
+ setReg(APIC_INITIAL_COUNT, readReg(APIC_INITIAL_COUNT));
+}