From: Nathan Binkert Date: Sun, 18 Apr 2010 20:23:24 +0000 (-0700) Subject: event: Allow EventWrapper to take an object reference X-Git-Tag: stable_2012_02_02~1423 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=12fc22571c0445ed42a89e6de672f774ab7e3e10;p=gem5.git event: Allow EventWrapper to take an object reference --- 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