projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4225a68
)
event: Allow EventWrapper to take an object reference
author
Nathan Binkert
<nate@binkert.org>
Sun, 18 Apr 2010 20:23:24 +0000
(13:23 -0700)
committer
Nathan Binkert
<nate@binkert.org>
Sun, 18 Apr 2010 20:23:24 +0000
(13:23 -0700)
src/sim/eventq.hh
patch
|
blob
|
history
diff --git
a/src/sim/eventq.hh
b/src/sim/eventq.hh
index 1b00088a32c8a8445a78ccf88a35e8be9a5f84af..3869ca287163fd1f8b8d78adea1c85cd50c3e4e6 100644
(file)
--- 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