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

Method on_timer_create

src/plugin/timer/timerlist.cpp:256–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256timer_t
257TimerList::on_timer_create(timer_t realId,
258 clockid_t clockid,
259 struct sigevent *sevp)
260{
261 TimerInfo tinfo;
262 timer_t virtId;
263
264 _do_lock_tbl();
265 JASSERT(!_timerVirtIdTable.realIdExists(realId)) (realId);
266
267 JASSERT(_timerVirtIdTable.getNewVirtualId(&virtId));
268 _timerVirtIdTable.updateMapping(virtId, realId);
269
270 memset(&tinfo, 0, sizeof(tinfo));
271 tinfo.clockid = clockid;
272 if (sevp == NULL) {
273 tinfo.sevp_null = true;
274 } else {
275 tinfo.sevp_null = false;
276 tinfo.sevp = *sevp;
277 }
278
279 _timerInfo[virtId] = tinfo;
280 _do_unlock_tbl();
281 return virtId;
282}
283
284void
285TimerList::on_timer_delete(timer_t timerid)

Callers 1

timer_createFunction · 0.80

Calls 6

memsetFunction · 0.85
realIdExistsMethod · 0.80
_do_lock_tblFunction · 0.70
_do_unlock_tblFunction · 0.70
getNewVirtualIdMethod · 0.45
updateMappingMethod · 0.45

Tested by

no test coverage detected