Deleted Added
full compact
ThreadList.h (254729) ThreadList.h (258884)
1//===-- ThreadList.h --------------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef liblldb_ThreadList_h_
11#define liblldb_ThreadList_h_
12
13#include <vector>
14
15#include "lldb/lldb-private.h"
16#include "lldb/Core/UserID.h"
1//===-- ThreadList.h --------------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef liblldb_ThreadList_h_
11#define liblldb_ThreadList_h_
12
13#include <vector>
14
15#include "lldb/lldb-private.h"
16#include "lldb/Core/UserID.h"
17#include "lldb/Utility/Iterable.h"
17
18
19// FIXME: Currently this is a thread list with lots of functionality for use only by
20// the process for which this is the thread list. If we ever want a container class
21// to hand out that is just a random subset of threads, with iterator functionality,
22// then we should make that part a base class, and make a ProcessThreadList for the
23// process.
24namespace lldb_private {

--- 39 unchanged lines hidden (view full) ---

64 void
65 Destroy();
66
67 // Note that "idx" is not the same as the "thread_index". It is a zero
68 // based index to accessing the current threads, whereas "thread_index"
69 // is a unique index assigned
70 lldb::ThreadSP
71 GetThreadAtIndex (uint32_t idx, bool can_update = true);
18
19
20// FIXME: Currently this is a thread list with lots of functionality for use only by
21// the process for which this is the thread list. If we ever want a container class
22// to hand out that is just a random subset of threads, with iterator functionality,
23// then we should make that part a base class, and make a ProcessThreadList for the
24// process.
25namespace lldb_private {

--- 39 unchanged lines hidden (view full) ---

65 void
66 Destroy();
67
68 // Note that "idx" is not the same as the "thread_index". It is a zero
69 // based index to accessing the current threads, whereas "thread_index"
70 // is a unique index assigned
71 lldb::ThreadSP
72 GetThreadAtIndex (uint32_t idx, bool can_update = true);
73
74 typedef std::vector<lldb::ThreadSP> collection;
75 typedef LockingAdaptedIterable<collection, lldb::ThreadSP, vector_adapter> ThreadIterable;
76
77 ThreadIterable
78 Threads ()
79 {
80 return ThreadIterable(m_threads, GetMutex());
81 }
72
73 lldb::ThreadSP
74 FindThreadByID (lldb::tid_t tid, bool can_update = true);
75
76 lldb::ThreadSP
77 FindThreadByProtocolID (lldb::tid_t tid, bool can_update = true);
78
79 lldb::ThreadSP

--- 60 unchanged lines hidden (view full) ---

140protected:
141
142 void
143 SetShouldReportStop (Vote vote);
144
145 void
146 NotifySelectedThreadChanged (lldb::tid_t tid);
147
82
83 lldb::ThreadSP
84 FindThreadByID (lldb::tid_t tid, bool can_update = true);
85
86 lldb::ThreadSP
87 FindThreadByProtocolID (lldb::tid_t tid, bool can_update = true);
88
89 lldb::ThreadSP

--- 60 unchanged lines hidden (view full) ---

150protected:
151
152 void
153 SetShouldReportStop (Vote vote);
154
155 void
156 NotifySelectedThreadChanged (lldb::tid_t tid);
157
148 typedef std::vector<lldb::ThreadSP> collection;
149 //------------------------------------------------------------------
150 // Classes that inherit from Process can see and modify these
151 //------------------------------------------------------------------
152 Process *m_process; ///< The process that manages this thread list.
153 uint32_t m_stop_id; ///< The process stop ID that this thread list is valid for.
154 collection m_threads; ///< The threads for this process.
155 lldb::tid_t m_selected_tid; ///< For targets that need the notion of a current thread.
156
157private:
158 ThreadList ();
159};
160
161} // namespace lldb_private
162
163#endif // liblldb_ThreadList_h_
158 //------------------------------------------------------------------
159 // Classes that inherit from Process can see and modify these
160 //------------------------------------------------------------------
161 Process *m_process; ///< The process that manages this thread list.
162 uint32_t m_stop_id; ///< The process stop ID that this thread list is valid for.
163 collection m_threads; ///< The threads for this process.
164 lldb::tid_t m_selected_tid; ///< For targets that need the notion of a current thread.
165
166private:
167 ThreadList ();
168};
169
170} // namespace lldb_private
171
172#endif // liblldb_ThreadList_h_