You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* This function will determine if the GVT hook should be called, and if it does, it calls the hook
581
581
*/
582
582
staticinlinevoidtw_gvt_hook_step(tw_pe*me) {
583
-
if (g_tw_gvt_hook&&g_tw_trigger_gvt_hook.trigger) {
583
+
if (g_tw_gvt_hook&&g_tw_gvt_hook_trigger.status) {
584
584
boolhas_hook_been_triggered= false;
585
-
switch (g_tw_trigger_gvt_hook.trigger) {
586
-
caseGVT_HOOK_TRIGGER_disabled:
587
-
tw_error(TW_LOC, "This is weird. This should have never happened. This switch case is guarded by g_tw_trigger_gvt_hook.trigger != GVT_HOOK_TRIGGER_disabled. Panic.");
585
+
switch (g_tw_gvt_hook_trigger.status) {
586
+
caseGVT_HOOK_STATUS_disabled:
587
+
tw_error(TW_LOC, "This is weird. This should have never happened. This switch case is guarded by g_tw_gvt_hook_trigger.trigger != GVT_HOOK_STATUS_disabled. Panic.");
&&CMP_GVT_HOOK_TO_NEXT_IN_QUEUE(me) <= 0// the next event is ahead of our next function trigger
616
616
&&tw_pq_get_size(me->pq) >0// we have events to process (not triggering function if simulation has finished)
617
617
) {
618
618
// GVT hook can only be triggered in sequential mode at user-defined points in time, aka, by `tw_trigger_gvt_hook_at`
619
-
if (g_tw_trigger_gvt_hook.trigger!=GVT_HOOK_TRIGGER_timestamp) {
619
+
if (g_tw_gvt_hook_trigger.status!=GVT_HOOK_STATUS_timestamp) {
620
620
if (first_seq_warning) {
621
621
tw_warning(TW_LOC, "GVT hook cannot be triggered by other than the timestamp trigger (set by calling `tw_trigger_gvt_hook_at`). The GVT hook won't be called");
0 commit comments