diff options
author | Pavel Labath <labath@google.com> | 2015-05-05 15:05:50 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2015-05-05 15:05:50 +0000 |
commit | 45f5cb31dcab4a956ababd123628e10fcc810d5b (patch) | |
tree | 7afb0e321acd7a1b391d09fb056d2a838d740ed1 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 941b743fc9a65d73345560d1695e844a0db1d366 (diff) | |
download | llvm-45f5cb31dcab4a956ababd123628e10fcc810d5b.zip llvm-45f5cb31dcab4a956ababd123628e10fcc810d5b.tar.gz llvm-45f5cb31dcab4a956ababd123628e10fcc810d5b.tar.bz2 |
[NativeProcessLinux] Get rid of the thread state coordinator thread
Summary:
This change removes the thread state coordinator thread by making all the operations it was
performing synchronous. In order to prevent deadlock, NativeProcessLinux must now always call
m_monitor->DoOperation with the m_threads_mutex released. This is needed because HandleWait
callbacks lock the mutex (which means the monitor thread will block waiting on whoever holds the
lock). If the other thread now requests a monitor operation, it will wait for the monitor thread
do process it, creating a deadlock.
To preserve this invariant I have introduced two new Monitor commands: "begin operation block"
and "end operation block". They begin command blocks the monitor from processing waitpid
events until the corresponding end command, thereby assuring the monitor does not attempt to
acquire the mutex.
Test Plan: Run the test suite locally, verify no tests fail.
Reviewers: vharron, chaoren
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D9227
llvm-svn: 236501
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions