summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2015-05-11 10:03:10 +0000
committerPavel Labath <labath@google.com>2015-05-11 10:03:10 +0000
commit8c8ff7af288829f357375a952155155c88e8945e (patch)
treec8326956da696b518638571f1f2c08eab5401754 /lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
parentec05fc7b16473e5bee82bc8f18bcd97fe68df101 (diff)
downloadbcm5719-llvm-8c8ff7af288829f357375a952155155c88e8945e.tar.gz
bcm5719-llvm-8c8ff7af288829f357375a952155155c88e8945e.zip
[NativeProcessLinux] Remove double thread state accounting
Summary: Now that all thread events are processed synchronously, there is no need to have separate records of whether a thread is running. This changes the (ever-dwindling) remains of the TSC to use NativeThreadLinux as the authoritative source of the state of threads. The rest of the ThreadContext we need has been moved to a member of NTL. Test Plan: ninja check-lldb continues to pass Reviewers: chaoren, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9562 llvm-svn: 236983
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeThreadLinux.h')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeThreadLinux.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.h b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
index c24faf8b811..d78e99c166c 100644
--- a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
+++ b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
@@ -95,6 +95,19 @@ namespace process_linux {
void
SetExited ();
+ Error
+ RequestStop ();
+
+ typedef std::function<Error (lldb::tid_t tid, bool supress_signal)> ResumeThreadFunction;
+ struct ThreadContext
+ {
+ bool stop_requested = false;
+ ResumeThreadFunction request_resume_function;
+ };
+
+ ThreadContext &
+ GetThreadContext() { return m_thread_context; }
+
// ---------------------------------------------------------------------
// Private interface
// ---------------------------------------------------------------------
@@ -110,6 +123,7 @@ namespace process_linux {
std::string m_stop_description;
using WatchpointIndexMap = std::map<lldb::addr_t, uint32_t>;
WatchpointIndexMap m_watchpoint_index_map;
+ ThreadContext m_thread_context;
};
} // namespace process_linux
OpenPOWER on IntegriCloud