MCPcopy Create free account
hub / github.com/dmtcp/dmtcp / timer_event_hook

Function timer_event_hook

src/plugin/timer/timerlist.cpp:58–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58static void
59timer_event_hook(DmtcpEvent_t event, DmtcpEventData_t *data)
60{
61 if (_timerlist != NULL) {
62 switch (event) {
63 case DMTCP_EVENT_ATFORK_CHILD:
64 case DMTCP_EVENT_VFORK_CHILD:
65 TimerList::instance().resetOnFork();
66 break;
67
68 case DMTCP_EVENT_VFORK_PREPARE:
69 vfork_timerlist = new TimerList(TimerList::instance());
70 break;
71
72 case DMTCP_EVENT_VFORK_PARENT:
73 case DMTCP_EVENT_VFORK_FAILED:
74 delete _timerlist;
75 _timerlist = vfork_timerlist;
76 break;
77
78 case DMTCP_EVENT_PRESUSPEND:
79 break;
80
81 case DMTCP_EVENT_PRECHECKPOINT:
82 preCheckpoint();
83 break;
84
85 case DMTCP_EVENT_RESUME:
86 break;
87
88 case DMTCP_EVENT_RESTART:
89 postRestart();
90 break;
91
92 default:
93 break;
94 }
95 }
96}
97
98DmtcpPluginDescriptor_t timerPlugin = {
99 DMTCP_PLUGIN_API_VERSION,

Callers

nothing calls this directly

Calls 3

preCheckpointFunction · 0.70
postRestartFunction · 0.70
resetOnForkMethod · 0.45

Tested by

no test coverage detected