diff options
author | Nathan Binkert <nate@binkert.org> | 2008-10-21 07:12:53 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2008-10-21 07:12:53 -0700 |
commit | 9836d81c2bba97e36c43ca22feee1d51a12ce6ac (patch) | |
tree | eaa352df03cfe58d315e975bbe2a6384c801f221 /src/arch/x86 | |
parent | aac93b7d0ce5e8e0241c7299b49cc59a9d095f3e (diff) | |
download | gem5-9836d81c2bba97e36c43ca22feee1d51a12ce6ac.tar.xz |
style: Use the correct m5 style for things relating to interrupts.
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/interrupts.cc | 10 | ||||
-rw-r--r-- | src/arch/x86/interrupts.hh | 50 |
2 files changed, 33 insertions, 27 deletions
diff --git a/src/arch/x86/interrupts.cc b/src/arch/x86/interrupts.cc index bfb4d5b9c..a16ea5360 100644 --- a/src/arch/x86/interrupts.cc +++ b/src/arch/x86/interrupts.cc @@ -470,7 +470,7 @@ X86ISA::Interrupts::setReg(ApicRegIndex reg, uint32_t val) } bool -X86ISA::Interrupts::check_interrupts(ThreadContext * tc) const +X86ISA::Interrupts::checkInterrupts(ThreadContext *tc) const { RFLAGS rflags = tc->readMiscRegNoEffect(MISCREG_RFLAGS); if (pendingUnmaskableInt) { @@ -492,9 +492,9 @@ X86ISA::Interrupts::check_interrupts(ThreadContext * tc) const } Fault -X86ISA::Interrupts::getInterrupt(ThreadContext * tc) +X86ISA::Interrupts::getInterrupt(ThreadContext *tc) { - assert(check_interrupts(tc)); + assert(checkInterrupts(tc)); // These are all probably fairly uncommon, so we'll make them easier to // check for. if (pendingUnmaskableInt) { @@ -523,9 +523,9 @@ X86ISA::Interrupts::getInterrupt(ThreadContext * tc) } void -X86ISA::Interrupts::updateIntrInfo(ThreadContext * tc) +X86ISA::Interrupts::updateIntrInfo(ThreadContext *tc) { - assert(check_interrupts(tc)); + assert(checkInterrupts(tc)); if (pendingUnmaskableInt) { if (pendingSmi) { DPRINTF(LocalApic, "SMI sent to core.\n"); diff --git a/src/arch/x86/interrupts.hh b/src/arch/x86/interrupts.hh index a998e2b12..8c7316217 100644 --- a/src/arch/x86/interrupts.hh +++ b/src/arch/x86/interrupts.hh @@ -70,8 +70,7 @@ class ThreadContext; -namespace X86ISA -{ +namespace X86ISA { class Interrupts : public BasicPioDevice, IntDev { @@ -189,7 +188,8 @@ class Interrupts : public BasicPioDevice, IntDev */ typedef X86LocalApicParams Params; - void setClock(Tick newClock) + void + setClock(Tick newClock) { clock = newClock; } @@ -243,7 +243,8 @@ class Interrupts : public BasicPioDevice, IntDev uint32_t readReg(ApicRegIndex miscReg); void setReg(ApicRegIndex reg, uint32_t val); - void setRegNoEffect(ApicRegIndex reg, uint32_t val) + void + setRegNoEffect(ApicRegIndex reg, uint32_t val) { regs[reg] = val; } @@ -252,14 +253,14 @@ class Interrupts : public BasicPioDevice, IntDev * Constructor. */ - Interrupts(Params * p) : BasicPioDevice(p), IntDev(this), - latency(p->pio_latency), clock(0), - apicTimerEvent(this), - pendingSmi(false), smiVector(0), - pendingNmi(false), nmiVector(0), - pendingExtInt(false), extIntVector(0), - pendingInit(false), initVector(0), - pendingUnmaskableInt(false) + Interrupts(Params * p) + : BasicPioDevice(p), IntDev(this), latency(p->pio_latency), clock(0), + apicTimerEvent(this), + pendingSmi(false), smiVector(0), + pendingNmi(false), nmiVector(0), + pendingExtInt(false), extIntVector(0), + pendingInit(false), initVector(0), + pendingUnmaskableInt(false) { pioSize = PageBytes; memset(regs, 0, sizeof(regs)); @@ -273,20 +274,22 @@ class Interrupts : public BasicPioDevice, IntDev * Functions for retrieving interrupts for the CPU to handle. */ - bool check_interrupts(ThreadContext * tc) const; - Fault getInterrupt(ThreadContext * tc); - void updateIntrInfo(ThreadContext * tc); + bool checkInterrupts(ThreadContext *tc) const; + Fault getInterrupt(ThreadContext *tc); + void updateIntrInfo(ThreadContext *tc); /* * Serialization. */ - void serialize(std::ostream & os) + void + serialize(std::ostream &os) { panic("Interrupts::serialize unimplemented!\n"); } - void unserialize(Checkpoint * cp, const std::string & section) + void + unserialize(Checkpoint *cp, const std::string §ion) { panic("Interrupts::unserialize unimplemented!\n"); } @@ -295,22 +298,25 @@ class Interrupts : public BasicPioDevice, IntDev * Old functions needed for compatability but which will be phased out * eventually. */ - void post(int int_num, int index) + void + post(int int_num, int index) { panic("Interrupts::post unimplemented!\n"); } - void clear(int int_num, int index) + void + clear(int int_num, int index) { panic("Interrupts::clear unimplemented!\n"); } - void clear_all() + void + clearAll() { - panic("Interrupts::clear_all unimplemented!\n"); + panic("Interrupts::clearAll unimplemented!\n"); } }; -}; +} // namespace X86ISA #endif // __ARCH_X86_INTERRUPTS_HH__ |