Fix FreeBSD build.

llvm-svn: 218685
This commit is contained in:
Zachary Turner 2014-09-30 16:56:56 +00:00
parent c76a445279
commit 25cbf5aac6
1 changed files with 6 additions and 6 deletions

View File

@ -851,7 +851,7 @@ WAIT_AGAIN:
// Finally, start monitoring the child process for change in state.
m_monitor_thread = Host::StartMonitoringChildProcess(
ProcessMonitor::MonitorCallback, this, GetPID(), true);
if (m_monitor_thread.GetState() != eThreadStateRunning)
if (!m_monitor_thread.IsJoinable())
{
error.SetErrorToGenericError();
error.SetErrorString("Process launch failed.");
@ -901,7 +901,7 @@ WAIT_AGAIN:
// Finally, start monitoring the child process for change in state.
m_monitor_thread = Host::StartMonitoringChildProcess(
ProcessMonitor::MonitorCallback, this, GetPID(), true);
if (m_monitor_thread.GetState() != eThreadStateRunning)
if (!m_monitor_thread.IsJoinable())
{
error.SetErrorToGenericError();
error.SetErrorString("Process attach failed.");
@ -921,7 +921,7 @@ ProcessMonitor::StartLaunchOpThread(LaunchArgs *args, Error &error)
{
static const char *g_thread_name = "lldb.process.freebsd.operation";
if (m_operation_thread.GetState() == eThreadStateRunning)
if (m_operation_thread.IsJoinable())
return;
m_operation_thread = ThreadLauncher::LaunchThread(g_thread_name, LaunchOpThread, args, &error);
@ -1097,7 +1097,7 @@ ProcessMonitor::StartAttachOpThread(AttachArgs *args, lldb_private::Error &error
{
static const char *g_thread_name = "lldb.process.freebsd.operation";
if (m_operation_thread.GetState() == eThreadStateRunning)
if (m_operation_thread.IsJoinable())
return;
m_operation_thread = ThreadLauncher::LaunchThread(g_thread_name, AttachOpThread, args, &error);
@ -1709,7 +1709,7 @@ ProcessMonitor::DupDescriptor(const char *path, int fd, int flags)
void
ProcessMonitor::StopMonitoringChildProcess()
{
if (m_monitor_thread.GetState() == eThreadStateRunning)
if (m_monitor_thread.IsJoinable())
{
m_monitor_thread.Cancel();
m_monitor_thread.Join(nullptr);
@ -1757,7 +1757,7 @@ ProcessMonitor::WaitForInitialTIDStop(lldb::tid_t tid)
void
ProcessMonitor::StopOpThread()
{
if (m_operation_thread.GetState() != eThreadStateRunning)
if (!m_operation_thread.IsJoinable())
return;
m_operation_thread.Cancel();