Fix a deadlock issue that would happen when loading an AppleTV or watchOS binary.
authorGreg Clayton <gclayton@apple.com>
Mon, 14 Nov 2016 23:45:50 +0000 (23:45 +0000)
committerGreg Clayton <gclayton@apple.com>
Mon, 14 Nov 2016 23:45:50 +0000 (23:45 +0000)
commit7b26dbb1251bbbe8e96c1bcc5815426727aca53a
tree0ba4b6e3b1df30fc36d9f54024304a2d5044c67c
parent9fc54826e0fffbbd491c4782920978cf4575da28
Fix a deadlock issue that would happen when loading an AppleTV or watchOS binary.

This was a regression that was caused by svn revision 269877:

commit 1ded4a2a25d60dd2c81bd432bcf63b6ded58e5d6
Author: Saleem Abdulrasool <compnerd@compnerd.org>
Date:   Wed May 18 01:59:10 2016 +0000

    remove use of Mutex in favour of std::{,recursive_}mutex

    This is a pretty straightforward first pass over removing a number of uses of
    Mutex in favor of std::mutex or std::recursive_mutex. The problem is that there
    are interfaces which take Mutex::Locker & to lock internal locks. This patch
    cleans up most of the easy cases. The only non-trivial change is in
    CommandObjectTarget.cpp where a Mutex::Locker was split into two.

    git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@269877 91177308-0d34-0410-b5e6-96231b3b80d8

This change actually changed the Platform::m_mutex to be non-recursive which caused the regression.

<rdar://problem/29094384>

llvm-svn: 286908
lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h