LLDB mainline
HostNativeThreadBase.cpp
Go to the documentation of this file.
1//===-- HostNativeThreadBase.cpp ------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
10#include "lldb/Host/HostInfo.h"
13#include "lldb/Utility/Log.h"
14
15#include "llvm/ADT/StringExtras.h"
16#include "llvm/Support/Threading.h"
17
18using namespace lldb;
19using namespace lldb_private;
20
22 : m_thread(thread) {}
23
25 return m_thread;
26}
27
29 return m_result;
30}
31
34}
35
38 m_result = 0; // NOLINT(modernize-use-nullptr)
39}
40
42 return m_thread == thread;
43}
44
46 lldb::thread_t result = m_thread;
48 m_result = 0; // NOLINT(modernize-use-nullptr)
49
50 return result;
51}
52
55 std::unique_ptr<ThreadLauncher::HostThreadCreateInfo> info_up(
57 llvm::set_thread_name(info_up->thread_name);
58
60 LLDB_LOGF(log, "thread created");
61
62 return info_up->impl();
63}
#define LLDB_LOGF(log,...)
Definition: Log.h:349
lldb::thread_result_t GetResult() const
static lldb::thread_result_t THREAD_ROUTINE ThreadCreateTrampoline(lldb::thread_arg_t arg)
virtual bool EqualsThread(lldb::thread_t thread) const
#define LLDB_INVALID_HOST_THREAD
Definition: lldb-types.h:69
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
Definition: Log.h:314
Definition: SBAddress.h:15
void * thread_arg_t
Definition: lldb-types.h:61
void * thread_result_t
Definition: lldb-types.h:62
pthread_t thread_t
Definition: lldb-types.h:58