Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.5 KiB
C++
Raw Permalink Normal View History

//===-- HostThread.cpp ----------------------------------------------------===//
2014-09-09 20:54:56 +00:00
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2014-09-09 20:54:56 +00:00
//
//===----------------------------------------------------------------------===//
#include "lldb/Host/HostThread.h"
#include "lldb/Host/HostNativeThread.h"
using namespace lldb;
using namespace lldb_private;
HostThread::HostThread() : m_native_thread(new HostNativeThread) {}
HostThread::HostThread(lldb::thread_t thread)
: m_native_thread(new HostNativeThread(thread)) {}
2017-05-12 04:51:55 +00:00
Status HostThread::Join(lldb::thread_result_t *result) {
2014-09-09 20:54:56 +00:00
return m_native_thread->Join(result);
}
2017-05-12 04:51:55 +00:00
Status HostThread::Cancel() { return m_native_thread->Cancel(); }
2014-09-09 20:54:56 +00:00
void HostThread::Reset() { return m_native_thread->Reset(); }
2014-09-09 20:54:56 +00:00
lldb::thread_t HostThread::Release() { return m_native_thread->Release(); }
2014-09-09 20:54:56 +00:00
bool HostThread::IsJoinable() const { return m_native_thread->IsJoinable(); }
2014-09-09 20:54:56 +00:00
HostNativeThread &HostThread::GetNativeThread() {
return static_cast<HostNativeThread &>(*m_native_thread);
2014-09-09 20:54:56 +00:00
}
const HostNativeThread &HostThread::GetNativeThread() const {
return static_cast<const HostNativeThread &>(*m_native_thread);
}
lldb::thread_result_t HostThread::GetResult() const {
return m_native_thread->GetResult();
}
bool HostThread::EqualsThread(lldb::thread_t thread) const {
2018-10-18 07:52:56 +00:00
return m_native_thread->EqualsThread(thread);
2014-09-09 20:54:56 +00:00
}