diff options
author | Nathan Binkert <nate@binkert.org> | 2010-04-18 13:23:24 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-04-18 13:23:24 -0700 |
commit | 12fc22571c0445ed42a89e6de672f774ab7e3e10 (patch) | |
tree | 06d8ce2a73e7235bbe2f42bb58e7b43c12d03822 | |
parent | 4225a68a9538401d9f5e772d8d090e57eb7adb7b (diff) | |
download | gem5-12fc22571c0445ed42a89e6de672f774ab7e3e10.tar.xz |
event: Allow EventWrapper to take an object reference
-rw-r--r-- | src/sim/eventq.hh | 7 |
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 |