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

Method resetOnFork

src/threadlist.cpp:159–174  ·  view source on GitHub ↗

* * New process. Empty the activeThreads list * *****************************************************************************/

Source from the content-addressed store, hash-verified

157 *
158 *****************************************************************************/
159void
160ThreadList::resetOnFork()
161{
162 while (activeThreads != NULL) {
163 ThreadList::threadIsDead(activeThreads); // takes care of updating
164 // "activeThreads" ptr.
165 }
166
167 // CONTEXT: initThread() resets curThread only if it's non-NULL.
168 // ... -> initializeMtcpEngine() -> ThreadList::init() -> initThread()
169 // See addToActiveList() for more information.
170 curThread = motherofall = nullptr;
171
172 init();
173 createCkptThread();
174}
175
176/*****************************************************************************
177 *

Callers

nothing calls this directly

Calls 1

initFunction · 0.85

Tested by

no test coverage detected