#include <cassert>
#include <iostream>
#include <string>
+#include <unordered_map>
#include <vector>
-#include "base/hashmap.hh"
#include "base/misc.hh"
#include "base/trace.hh"
#include "cpu/smt.hh"
event->process();
if (event->isExitEvent()) {
- assert(!event->flags.isSet(Event::AutoDelete) ||
+ assert(!event->flags.isSet(Event::Managed) ||
!event->flags.isSet(Event::IsMainQueue)); // would be silly
return event;
}
event->flags.clear(Event::Squashed);
}
- if (event->flags.isSet(Event::AutoDelete) && !event->scheduled())
- delete event;
+ event->release();
return NULL;
}
// Old checkpoints had no concept of the Initialized flag
// so restoring from old checkpoints always fail.
- // Events are initialized on construction but original code
- // "flags = _flags" would just overwrite the initialization.
- // So, read in the checkpoint flags, but then set the Initialized
+ // Events are initialized on construction but original code
+ // "flags = _flags" would just overwrite the initialization.
+ // So, read in the checkpoint flags, but then set the Initialized
// flag on top of it in order to avoid failures.
assert(initialized());
flags = _flags;
bool
EventQueue::debugVerify() const
{
- m5::hash_map<long, bool> map;
+ std::unordered_map<long, bool> map;
Tick time = 0;
short priority = 0;