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

Function ckpttimer_event_hook

contrib/ckpttimer/ckpttimer.cpp:203–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203static void
204ckpttimer_event_hook(DmtcpEvent_t event, DmtcpEventData_t *data)
205{
206 sigset_t mask;
207
208 switch (event) {
209 case DMTCP_EVENT_INIT:
210 {
211 if (!doneInitialization) {
212 get_and_save_envvars();
213
214 /* Create a timer */
215 timerid = make_timer();
216 sigemptyset(&mask);
217 sigaddset(&mask, g_sig_num);
218 doneInitialization = 1;
219 }
220
221 JTRACE("The plugin has been initialized.");
222 break;
223 }
224
225 case DMTCP_EVENT_PRECHECKPOINT:
226 pre_ckpt();
227 break;
228
229 case DMTCP_EVENT_RESUME:
230 resume();
231 break;
232
233 case DMTCP_EVENT_RESTART:
234 restart();
235 break;
236
237 default:
238 break;
239 }
240}
241
242DmtcpPluginDescriptor_t ckpttimer_plugin = {
243 DMTCP_PLUGIN_API_VERSION,

Callers

nothing calls this directly

Calls 5

get_and_save_envvarsFunction · 0.85
make_timerFunction · 0.85
pre_ckptFunction · 0.70
resumeFunction · 0.70
restartFunction · 0.70

Tested by

no test coverage detected