Add a new SBThread::SafeToCallFunctions API; this calls over to

the SystemRuntime to check if a thread will have any problems 
performing an inferior function call so the driver can skip
making that function call on that thread.  Often the function
call can be executed on another thread instead.
<rdar://problem/16777874> 

llvm-svn: 208732
This commit is contained in:
Jason Molenda
2014-05-13 22:02:48 +00:00
parent 1b91aa2cf5
commit b4892cd266
15 changed files with 261 additions and 0 deletions

View File

@@ -1437,3 +1437,12 @@ SBThread::GetExtendedBacktraceOriginatingIndexID ()
return thread_sp->GetExtendedBacktraceOriginatingIndexID();
return LLDB_INVALID_INDEX32;
}
bool
SBThread::SafeToCallFunctions ()
{
ThreadSP thread_sp(m_opaque_sp->GetThreadSP());
if (thread_sp)
return thread_sp->SafeToCallFunctions();
return true;
}