template<
SchedulingPhase sched_phase_T = SchedulingPhase::Update>
class sparta::GlobalEvent< sched_phase_T >
A type of "global" reusable event.
This is to support dynamically created objects that require event semantics, but cannot create events. The original requirement comes from sparta::CoreExample: On the one hand, each dummy instruction contains a sparta::SharedData instance to represent and update its status. sparta::SharedData contains event handler to support "delayed update (from
present-state to next-state)" semantics. On the other hand, the sparta::SharedData instance is required to be "copyable", since dummy instructions are created dynamically in the fetch unit. However, the original implementation of sparta::SharedData uses sparta::UniqueEvent, which is not copyable at run time.
To support this, the concept of "global" reusable events can be created, but with certain cautions in place: #. The Scheduleable being scheduled will be unique to a specific object requiring a timed call. #. The Scheduleable being scheduled might point to a dead callback (the originator of the event might be deallocated). #. The Scheduleable can be scheduled immediately, in the immediate future, or far into the future.
Definition at line 93 of file GlobalEvent.hpp.