summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-07-22 18:34:21 +0000
committerGreg Clayton <gclayton@apple.com>2010-07-22 18:34:21 +0000
commit49182ed65a59d2a4c6848623ddb28c3afbec9558 (patch)
tree3bad55468ef649e1d01f0c5764f34025e3649f7e /lldb/source/Target/Process.cpp
parent8cf0593c87d3a470687375cf1cd467de75147488 (diff)
downloadbcm5719-llvm-49182ed65a59d2a4c6848623ddb28c3afbec9558.tar.gz
bcm5719-llvm-49182ed65a59d2a4c6848623ddb28c3afbec9558.zip
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
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 11ba38e6b89..f351c7115f2 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -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;
}
OpenPOWER on IntegriCloud