summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2010-04-18 13:23:24 -0700
committerNathan Binkert <nate@binkert.org>2010-04-18 13:23:24 -0700
commit12fc22571c0445ed42a89e6de672f774ab7e3e10 (patch)
tree06d8ce2a73e7235bbe2f42bb58e7b43c12d03822
parent4225a68a9538401d9f5e772d8d090e57eb7adb7b (diff)
downloadgem5-12fc22571c0445ed42a89e6de672f774ab7e3e10.tar.xz
event: Allow EventWrapper to take an object reference
-rw-r--r--src/sim/eventq.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sim/eventq.hh b/src/sim/eventq.hh
index 1b00088a3..3869ca287 100644
--- a/src/sim/eventq.hh
+++ b/src/sim/eventq.hh
@@ -577,6 +577,13 @@ class EventWrapper : public Event
setFlags(AutoDelete);
}
+ EventWrapper(T &obj, bool del = false, Priority p = Default_Pri)
+ : Event(p), object(&obj)
+ {
+ if (del)
+ setFlags(AutoDelete);
+ }
+
void process() { (object->*F)(); }
const std::string