8 : scheduler(scheduler_)
19 std::cerr <<
"Internal error: Schedulable \"" <<
typeid(*this).name()
20 <<
"\" failed to unregister.\n";
25 scheduler.setSyncPoint(timestamp, *
this);
30 return scheduler.removeSyncPoint(*
this);
35 scheduler.removeSyncPoints(*
this);
40 auto dummy = EmuTime::dummy();
41 return scheduler.pendingSyncPoint(*
this, dummy);
46 return scheduler.pendingSyncPoint(*
this, result);
54template<
typename Archive>
58 if constexpr (!Archive::IS_LOADER) {
59 syncPoints = scheduler.getSyncPoints(*
this);
61 ar.serialize(
"syncPoints", syncPoints);
62 if constexpr (Archive::IS_LOADER) {
64 for (
const auto& s : syncPoints) {
Every class that wants to get scheduled at some point must inherit from this class.
void setSyncPoint(EmuTime::param timestamp)
void serialize(Archive &ar, unsigned version)
Schedulable(const Schedulable &)=delete
virtual void schedulerDeleted()
Just before the the Scheduler is deleted, it calls this method of all the Schedulables that are still...
bool pendingSyncPoint() const
EmuTime::param getCurrentTime() const
Convenience method: This is the same as getScheduler().getCurrentTime().
EmuTime::param getCurrentTime() const
Get the current scheduler time.
std::vector< SynchronizationPoint > SyncPoints
This file implemented 3 utility functions:
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)