This issue was originally one raised as a public pull request. However the proposed solution was accessing internal fields in sc_simcontext rather than using access methods. Basically the issue to specified in pull request 9 is:
Remove global sc_events (sc_event::none and sc_process_handle::non_event) by converting them to functions returning a reference to an sc_event in the current simulation context. This eases reset of the simulation context, as discussed in #8, as these sc_events no longer contain any reference to the initial simulation context.
The solution I propose is to move the sc_event locations to sc_simcontext using an internal method.
const sc_event& non_event();
This leads to the following two static methods:
This issue was originally one raised as a public pull request. However the proposed solution was accessing internal fields in sc_simcontext rather than using access methods. Basically the issue to specified in pull request 9 is:
Remove global sc_events (sc_event::none and sc_process_handle::non_event) by converting them to functions returning a reference to an sc_event in the current simulation context. This eases reset of the simulation context, as discussed in #8, as these sc_events no longer contain any reference to the initial simulation context.
The solution I propose is to move the sc_event locations to sc_simcontext using an internal method. const sc_event& non_event(); This leads to the following two static methods:
static const sc_event& sc_event::none() { return sc_get_curr_simcontext()->null_event(); }
static const sc_event& sc_process_handle::non_event() { return sc_get_curr_simcontext()->null_event(); }
The "null event" will be a field within sc_simcontext.