SST/macro
|
The interface for something that can schedule messages. More...
#include <event_scheduler.h>
Public Member Functions | |
virtual | ~event_scheduler () |
virtual std::string | to_string () const |
virtual void | handle (event *ev) |
void | cancel_all_messages () |
void | ipc_schedule (timestamp t, event_handler *handler, event *ev) |
ipc_schedule Should only be called on stub handlers for which handler->ipc_handler() returns true More... | |
void | schedule (timestamp t, event_handler *handler, event *ev) |
Add an event to the event queue, where msg will get delivered to handler at time t. More... | |
void | schedule (timestamp t, event_queue_entry *ev) |
void | schedule_now (event_queue_entry *ev) |
void | schedule_now (event_handler *handler, event *ev) |
void | schedule_delay (timestamp delay, event_handler *handler, event *ev) |
void | schedule_delay (timestamp delay, event_queue_entry *ev) |
void | send_self_event (timestamp arrival, event *ev) |
void | send_delayed_self_event (timestamp delay, event *ev) |
void | send_now_self_event (event *ev) |
void | send_self_event_queue (timestamp arrival, event_queue_entry *ev) |
void | send_delayed_self_event_queue (timestamp delay, event_queue_entry *ev) |
void | send_now_self_event_queue (event_queue_entry *ev) |
void | register_stat (stat_collector *coll) |
virtual void | set_event_manager (event_manager *m) |
Set the eventmanager for this scheduler. More... | |
event_manager * | event_mgr () const |
timestamp | now () const |
get the current time More... | |
int | nthread () const |
Public Member Functions inherited from sstmac::event_handler | |
virtual | ~event_handler () |
event_loc_id | event_location () const |
virtual bool | ipc_handler () const |
Whether an event handler is a "fake" handler that represents logical process boundary. More... | |
int | thread_id () const |
virtual void | deadlock_check (event *ev) |
virtual void | deadlock_check () |
Protected Member Functions | |
event_scheduler () | |
Protected Member Functions inherited from sstmac::event_handler | |
event_handler () | |
void | init_loc_id (event_loc_id id) |
void | init_thread_id (int id) |
Protected Attributes | |
uint32_t | seqnum_ |
Private Member Functions | |
void | sanity_check (timestamp t) |
void | multithread_schedule (int src_thread, int dst_thread, timestamp t, event_queue_entry *ev) |
Private Attributes | |
event_manager * | eventman_ |
Additional Inherited Members | |
Static Public Attributes inherited from sstmac::event_handler | |
static const int | null_lpid = -1 |
static const int | null_threadid = -1 |
The interface for something that can schedule messages.
Definition at line 52 of file event_scheduler.h.
|
inlinevirtual |
Definition at line 61 of file event_scheduler.h.
|
protected |
Referenced by nthread(), and to_string().
void sstmac::event_scheduler::cancel_all_messages | ( | ) |
Referenced by to_string().
|
inline |
Definition at line 180 of file event_scheduler.h.
References eventman_.
|
virtual |
Implements sstmac::event_handler.
Reimplemented in sstmac::hw::node.
Referenced by to_string(), and sstmac::event_subscheduler::to_string().
void sstmac::event_scheduler::ipc_schedule | ( | timestamp | t, |
event_handler * | handler, | ||
event * | ev | ||
) |
ipc_schedule Should only be called on stub handlers for which handler->ipc_handler() returns true
t | The time the event will run at |
handler | The handler to receive the event. This should always be a stub for a real handler on a remote process. |
ev | The event to deliver |
Referenced by to_string().
|
private |
|
inline |
get the current time
Definition at line 189 of file event_scheduler.h.
References eventman_, and sstmac::event_manager::now().
Referenced by to_string().
|
inline |
Definition at line 194 of file event_scheduler.h.
References event_scheduler(), eventman_, and sstmac::event_manager::nthread().
void sstmac::event_scheduler::register_stat | ( | stat_collector * | coll | ) |
Referenced by to_string().
|
private |
void sstmac::event_scheduler::schedule | ( | timestamp | t, |
event_handler * | handler, | ||
event * | ev | ||
) |
Add an event to the event queue, where msg will get delivered to handler at time t.
t | Time at which the event should happen |
handler | The handler for the event |
msg | The message to deliver to the handler |
Referenced by to_string(), and sstmac::event_subscheduler::to_string().
void sstmac::event_scheduler::schedule | ( | timestamp | t, |
event_queue_entry * | ev | ||
) |
void sstmac::event_scheduler::schedule_delay | ( | timestamp | delay, |
event_handler * | handler, | ||
event * | ev | ||
) |
Referenced by to_string(), and sstmac::event_subscheduler::to_string().
void sstmac::event_scheduler::schedule_delay | ( | timestamp | delay, |
event_queue_entry * | ev | ||
) |
void sstmac::event_scheduler::schedule_now | ( | event_queue_entry * | ev | ) |
Referenced by to_string(), and sstmac::event_subscheduler::to_string().
void sstmac::event_scheduler::schedule_now | ( | event_handler * | handler, |
event * | ev | ||
) |
Referenced by to_string(), and sstmac::event_subscheduler::to_string().
void sstmac::event_scheduler::send_delayed_self_event_queue | ( | timestamp | delay, |
event_queue_entry * | ev | ||
) |
Referenced by to_string(), and sstmac::event_subscheduler::to_string().
void sstmac::event_scheduler::send_now_self_event | ( | event * | ev | ) |
Referenced by to_string(), and sstmac::event_subscheduler::to_string().
void sstmac::event_scheduler::send_now_self_event_queue | ( | event_queue_entry * | ev | ) |
Referenced by to_string(), and sstmac::event_subscheduler::to_string().
Referenced by to_string(), and sstmac::event_subscheduler::to_string().
void sstmac::event_scheduler::send_self_event_queue | ( | timestamp | arrival, |
event_queue_entry * | ev | ||
) |
Referenced by to_string(), and sstmac::event_subscheduler::to_string().
|
virtual |
Set the eventmanager for this scheduler.
Unfortunately, this always has to be called after an event_scheduler is constructed.
m | the simulation eventmanager |
Reimplemented in sstmac::hw::node, and sstmac::hw::simple_node.
Referenced by to_string().
|
inlinevirtual |
Implements sstmac::event_handler.
Reimplemented in sstmac::hw::node.
Definition at line 65 of file event_scheduler.h.
References cancel_all_messages(), event_scheduler(), handle(), sstmac::init(), ipc_schedule(), now(), register_stat(), schedule(), schedule_delay(), schedule_now(), send_delayed_self_event(), send_delayed_self_event_queue(), send_now_self_event(), send_now_self_event_queue(), send_self_event(), send_self_event_queue(), and set_event_manager().
|
private |
Definition at line 211 of file event_scheduler.h.
Referenced by event_mgr(), now(), and nthread().
|
protected |
Definition at line 201 of file event_scheduler.h.