summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadSpec.cpp
blob: 5d1089188feac42ab220a296d9423e52ff4aaa28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//===-- ThreadSpec.cpp ----------------------------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "lldb/Target/Thread.h"
#include "lldb/Target/ThreadSpec.h"

using namespace lldb;
using namespace lldb_private;

ThreadSpec::ThreadSpec() :
    m_index (-1),
    m_tid (LLDB_INVALID_THREAD_ID),
    m_name(),
    m_queue_name ()
{
}

ThreadSpec::ThreadSpec (const ThreadSpec &rhs) :
    m_index(rhs.m_index),
    m_tid(rhs.m_tid),
    m_name(rhs.m_name),
    m_queue_name(rhs.m_queue_name)
{
}

const ThreadSpec &
ThreadSpec::operator=(const ThreadSpec &rhs)
{
    m_index = rhs.m_index;
    m_tid = rhs.m_tid;
    m_name = rhs.m_name;
    m_queue_name = rhs.m_queue_name;
    return *this;
}

const char *
ThreadSpec::GetName () const
{
    if (m_name.empty())
        return NULL;
    else
        return m_name.c_str();
}

const char *
ThreadSpec::GetQueueName () const
{
    if (m_queue_name.empty())
        return NULL;
    else
        return m_queue_name.c_str();
}
OpenPOWER on IntegriCloud