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

Function removeExitedChildTids

src/plugin/pid/pid.cpp:107–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107static
108void removeExitedChildTids()
109{
110 // First remove stale thread ids.
111 pid_t realPid = _real_getpid();
112 DmtcpMutexLock(&exitedChildTidsLock);
113 for (auto it = exitedChildTids->begin(); it != exitedChildTids->end();) {
114 pid_t tid = *it;
115 pid_t realTid = VIRTUAL_TO_REAL_PID(tid);
116 if (_real_tgkill(realPid, realTid, 0) == 0) {
117 it++;
118 } else {
119 it = exitedChildTids->erase(it);
120 VirtualPidTable::instance().erase(tid);
121 }
122 }
123 DmtcpMutexUnlock(&exitedChildTidsLock);
124}
125
126extern "C"
127void dmtcp_init_virtual_tid()

Callers 2

dmtcp_init_virtual_tidFunction · 0.85
pid_event_hookFunction · 0.85

Calls 7

DmtcpMutexLockFunction · 0.85
_real_tgkillFunction · 0.85
DmtcpMutexUnlockFunction · 0.85
beginMethod · 0.80
endMethod · 0.80
eraseMethod · 0.80
_real_getpidFunction · 0.70

Tested by

no test coverage detected