Invoked via pthread_create as start_routine On return, it calls mtcp_threadiszombie()
| 68 | // Invoked via pthread_create as start_routine |
| 69 | // On return, it calls mtcp_threadiszombie() |
| 70 | static void * |
| 71 | thread_start(void *arg) |
| 72 | { |
| 73 | Thread *thread = (Thread *) arg; |
| 74 | |
| 75 | processChildThread(thread); |
| 76 | |
| 77 | void *result = thread->fn(thread->arg); |
| 78 | |
| 79 | JTRACE("Thread returned") (thread->tid); |
| 80 | WrapperLock wrapperLock; |
| 81 | ThreadList::threadExit(); |
| 82 | |
| 83 | /* |
| 84 | * This thread has finished its execution, do some cleanup on our part. |
| 85 | * erasing the virtualTid entry from virtualpidtable |
| 86 | * FIXME: What if the process gets checkpointed after erase() but before the |
| 87 | * thread actually exits? |
| 88 | */ |
| 89 | PluginManager::eventHook(DMTCP_EVENT_PTHREAD_RETURN, NULL); |
| 90 | return result; |
| 91 | } |
| 92 | |
| 93 | extern "C" int |
| 94 | pthread_create(pthread_t *pth, |
nothing calls this directly
no test coverage detected