This way they don't try to detach themselves from a parent object which
no longer exists.
Change-Id: Id4a3f3b2241cf8c67cae9b983bd4c1acbef083e3
Reviewed-on: https://gem5-review.googlesource.com/c/13301
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
return _triggeredStamp == scheduler.changeStamp();
}
+void
+Event::clearParent()
+{
+ if (!parent)
+ return;
+ Object::getFromScObject(parent)->delChildEvent(sc_event());
+ parent = nullptr;
+ topLevelEvents.emplace(topLevelEvents.end(), sc_event());
+}
+
Events topLevelEvents;
Events allEvents;
}
}
+ void clearParent();
+
private:
sc_core::sc_event *_sc_event;
}
children.clear();
+ for (auto event: events)
+ Event::getFromScEvent(event)->clearParent();
+
if (parent)
popObject(&parent->_gem5_object->children, _name);
else