diff options
Diffstat (limited to 'src/cpu/o3/commit_impl.hh')
-rw-r--r-- | src/cpu/o3/commit_impl.hh | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/cpu/o3/commit_impl.hh b/src/cpu/o3/commit_impl.hh index aba2696c2..bf5ee8a38 100644 --- a/src/cpu/o3/commit_impl.hh +++ b/src/cpu/o3/commit_impl.hh @@ -71,26 +71,12 @@ using namespace std; template <class Impl> -DefaultCommit<Impl>::TrapEvent::TrapEvent(DefaultCommit<Impl> *_commit, - ThreadID _tid) - : Event(CPU_Tick_Pri, AutoDelete), commit(_commit), tid(_tid) -{ -} - -template <class Impl> void -DefaultCommit<Impl>::TrapEvent::process() +DefaultCommit<Impl>::processTrapEvent(ThreadID tid) { // This will get reset by commit if it was switched out at the // time of this event processing. - commit->trapSquash[tid] = true; -} - -template <class Impl> -const char * -DefaultCommit<Impl>::TrapEvent::description() const -{ - return "Trap"; + trapSquash[tid] = true; } template <class Impl> @@ -537,7 +523,9 @@ DefaultCommit<Impl>::generateTrapEvent(ThreadID tid, Fault inst_fault) { DPRINTF(Commit, "Generating trap event for [tid:%i]\n", tid); - TrapEvent *trap = new TrapEvent(this, tid); + EventFunctionWrapper *trap = new EventFunctionWrapper( + [this, tid]{ processTrapEvent(tid); }, + "Trap", true, Event::CPU_Tick_Pri); Cycles latency = dynamic_pointer_cast<SyscallRetryFault>(inst_fault) ? cpu->syscallRetryLatency : trapLatency; |