diff options
author | Sean Wilson <spwilson2@wisc.edu> | 2017-06-28 08:52:08 -0500 |
---|---|---|
committer | Sean Wilson <spwilson2@wisc.edu> | 2017-07-12 20:07:05 +0000 |
commit | 8c1ea47b3c2fc90378eb16f3ad92d4ae522567c5 (patch) | |
tree | 4ac53d611aaedd5728e9f1100d43d166634ab5a8 /src/cpu/o3/commit.hh | |
parent | 741261f10bb308cdc200c5dfd8eb68567349cf19 (diff) | |
download | gem5-8c1ea47b3c2fc90378eb16f3ad92d4ae522567c5.tar.xz |
cpu: Refactor some Event subclasses to lambdas
Change-Id: If765c6100d67556f157e4e61aa33c2b7eeb8d2f0
Signed-off-by: Sean Wilson <spwilson2@wisc.edu>
Reviewed-on: https://gem5-review.googlesource.com/3923
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/cpu/o3/commit.hh')
-rw-r--r-- | src/cpu/o3/commit.hh | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/cpu/o3/commit.hh b/src/cpu/o3/commit.hh index 5977f94f3..f508a372e 100644 --- a/src/cpu/o3/commit.hh +++ b/src/cpu/o3/commit.hh @@ -101,21 +101,6 @@ class DefaultCommit typedef O3ThreadState<Impl> Thread; - /** Event class used to schedule a squash due to a trap (fault or - * interrupt) to happen on a specific cycle. - */ - class TrapEvent : public Event { - private: - DefaultCommit<Impl> *commit; - ThreadID tid; - - public: - TrapEvent(DefaultCommit<Impl> *_commit, ThreadID _tid); - - void process(); - const char *description() const; - }; - /** Overall commit status. Used to determine if the CPU can deschedule * itself due to a lack of activity. */ @@ -157,6 +142,9 @@ class DefaultCommit /** To probe when an instruction is squashed */ ProbePointArg<DynInstPtr> *ppSquash; + /** Mark the thread as processing a trap. */ + void processTrapEvent(ThreadID tid); + public: /** Construct a DefaultCommit with the given parameters. */ DefaultCommit(O3CPU *_cpu, DerivO3CPUParams *params); |