static void checkpoint() { printf("*** The plugin %s is being called before checkpointing. ***\n", __FILE__); real_sleep(1); printf("*** Finished calling real_sleep() for 1 second. ***\n"); }
void dmtcp_event_hook(DmtcpEvent_t event, DmtcpEventData_t *data) { static void (*next_fnc)() = NULL;/* Same type signature as this fnc */ /* NOTE: See warning in plugin/README about calls to printf here. */ switch (event) { case DMTCP_EVENT_WRITE_CKPT: printf("*** The plugin %s is being called before checkpointing. ***\n", __FILE__); real_sleep(1); printf("*** Finished calling real_sleep() for 1 second. ***\n"); break; case DMTCP_EVENT_RESUME: printf("*** The plugin %s has now been checkpointed. ***\n", __FILE__); break; default: ; } /* Call this next line in order to pass DMTCP events to later plugins. */ DMTCP_NEXT_EVENT_HOOK(event, data); }