projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34d36c4
)
constructor option to make the wrapped event autodelete
author
Nathan Binkert
<binkertn@umich.edu>
Fri, 5 Mar 2004 10:45:45 +0000
(
05:45
-0500)
committer
Nathan Binkert
<binkertn@umich.edu>
Fri, 5 Mar 2004 10:45:45 +0000
(
05:45
-0500)
--HG--
extra : convert_revision :
8663c874c533685adf21eea968b08b40b7d7b665
sim/eventq.hh
patch
|
blob
|
history
diff --git
a/sim/eventq.hh
b/sim/eventq.hh
index 60a61fa2981156ca79c1104c5d0b85bc54bcfa59..ed37fd4f4a25320321c5b056107864c0ca9b2dbc 100644
(file)
--- a/
sim/eventq.hh
+++ b/
sim/eventq.hh
@@
-243,10
+243,13
@@
class EventWrapper : public Event
T *object;
public:
- EventWrapper(T *obj, EventQueue *q = &mainEventQueue,
+ EventWrapper(T *obj,
bool del = false,
EventQueue *q = &mainEventQueue,
Priority p = Default_Pri)
: Event(q, p), object(obj)
- {}
+ {
+ if (del)
+ setFlags(AutoDelete);
+ }
void process() { (object->*F)(); }
};
@@
-324,6
+327,8
@@
inline void
Event::schedule(Tick t)
{
assert(!scheduled());
+ assert(t >= curTick);
+
setFlags(Scheduled);
#if TRACING_ON
when_scheduled = curTick;