Lock mutex in the same order.
authorHafiz Abid Qadeer <hafiz_abid@mentor.com>
Wed, 11 Feb 2015 16:37:17 +0000 (16:37 +0000)
committerHafiz Abid Qadeer <hafiz_abid@mentor.com>
Wed, 11 Feb 2015 16:37:17 +0000 (16:37 +0000)
commit5bf72c46b33c0058b4147fd6bbda4b53322f67ca
tree82222661aaa9c3297e2cb0e05f032604075bb586
parent88d21343df99ef22b7666aa413985508f33a3328
Lock mutex in the same order.
SBProcess uses 2 mutexex; RunLock and APILock. Apart from 2 places, RunLock
is locked before API lock. I have fixed the 2 places where order was different.
I observed a deadlock due to this different order in lldb-mi once. Although
lldb-mi command and event thread dont run at the same time now. So it can not deadlock
there but can still be problem for some other clients.

Pre-approved by Greg in http://lists.cs.uiuc.edu/pipermail/lldb-dev/2015-February/006509.html

llvm-svn: 228844
lldb/source/API/SBProcess.cpp