forked from OSchip/llvm-project
This patch changes the point at which Process::m_private_state_thread is
invalidated. There was a race condition where the private thread would invalidate its own pthread_t object before the parent could perform a pthread_cancel/pthread_join sequence. Patch from Stephen Wilson. llvm-svn: 109131
This commit is contained in:
parent
8cf0593c87
commit
49182ed65a
|
@ -1433,6 +1433,7 @@ Process::ControlPrivateStateThread (uint32_t signal)
|
|||
|
||||
thread_result_t result = NULL;
|
||||
Host::ThreadJoin (m_private_state_thread, &result, NULL);
|
||||
m_private_state_thread = LLDB_INVALID_HOST_THREAD;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1470,7 +1471,6 @@ Process::PrivateStateThread (void *arg)
|
|||
{
|
||||
Process *proc = static_cast<Process*> (arg);
|
||||
void *result = proc->RunPrivateStateThread ();
|
||||
proc->m_private_state_thread = LLDB_INVALID_HOST_THREAD;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue