Files
fail/src/core/sal/bochs/InterruptSuppression.ah
2012-09-11 17:10:04 +00:00

28 lines
630 B
Plaintext

#ifndef __INTERRUPT_SUPPRESSION_AH__
#define __INTERRUPT_SUPPRESSION_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#if defined(BUILD_BOCHS) && defined(CONFIG_SUPPRESS_INTERRUPTS)
#include "bochs.h"
#include "cpu/cpu.h"
#include "../SALInst.hpp"
aspect InterruptSuppression {
pointcut interrupt_method() = "void bx_cpu_c::interrupt(...)";
advice execution (interrupt_method()) : around ()
{
unsigned vector = *(tjp->arg<0>());
if (!fail::simulator.isSuppressedInterrupt(vector)) {
tjp->proceed();
}
}
};
#endif // CONFIG_SUPPRESS_INTERRUPTS
#endif // __INTERRUPT_SUPPRESSION_AH__