Don't expose the pthread_mutex_t underlying the Mutex & Mutex::Locker classes.  
No one was using it and Locker(pthread_mutex_t *) immediately asserts for 
pthread_mutex_t's that don't come from a Mutex anyway.  Rather than try to make
that work, we should maintain the Mutex abstraction and not pass around the
platform implementation...

Make Mutex::Locker::Lock take a Mutex & or a Mutex *, and remove the constructor
taking a pthread_mutex_t *.  You no longer need to call Mutex::GetMutex to pass
your mutex to a Locker (you can't in fact, since I made it private.)


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156221 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBCommandInterpreter.cpp b/source/API/SBCommandInterpreter.cpp
index 7dd4b2e..515fb28 100644
--- a/source/API/SBCommandInterpreter.cpp
+++ b/source/API/SBCommandInterpreter.cpp
@@ -93,7 +93,7 @@
         TargetSP target_sp(m_opaque_ptr->GetDebugger().GetSelectedTarget());
         Mutex::Locker api_locker;
         if (target_sp)
-            api_locker.Lock(target_sp->GetAPIMutex().GetMutex());
+            api_locker.Lock(target_sp->GetAPIMutex());
         m_opaque_ptr->HandleCommand (command_line, add_to_history, result.ref());
     }
     else
@@ -238,7 +238,7 @@
         TargetSP target_sp(m_opaque_ptr->GetDebugger().GetSelectedTarget());
         Mutex::Locker api_locker;
         if (target_sp)
-            api_locker.Lock(target_sp->GetAPIMutex().GetMutex());
+            api_locker.Lock(target_sp->GetAPIMutex());
         m_opaque_ptr->SourceInitFile (false, result.ref());
     }
     else
@@ -263,7 +263,7 @@
         TargetSP target_sp(m_opaque_ptr->GetDebugger().GetSelectedTarget());
         Mutex::Locker api_locker;
         if (target_sp)
-            api_locker.Lock(target_sp->GetAPIMutex().GetMutex());
+            api_locker.Lock(target_sp->GetAPIMutex());
         m_opaque_ptr->SourceInitFile (true, result.ref());
     }
     else
diff --git a/source/API/SBDebugger.cpp b/source/API/SBDebugger.cpp
index b052f77..46d5118 100644
--- a/source/API/SBDebugger.cpp
+++ b/source/API/SBDebugger.cpp
@@ -308,7 +308,7 @@
         TargetSP target_sp (m_opaque_sp->GetSelectedTarget());
         Mutex::Locker api_locker;
         if (target_sp)
-            api_locker.Lock(target_sp->GetAPIMutex().GetMutex());
+            api_locker.Lock(target_sp->GetAPIMutex());
 
         SBCommandInterpreter sb_interpreter(GetCommandInterpreter ());
         SBCommandReturnObject result;
@@ -830,7 +830,7 @@
         TargetSP target_sp (m_opaque_sp->GetSelectedTarget());
         Mutex::Locker api_locker;
         if (target_sp)
-            api_locker.Lock(target_sp->GetAPIMutex().GetMutex());
+            api_locker.Lock(target_sp->GetAPIMutex());
         InputReaderSP reader_sp(*reader);
         m_opaque_sp->PushInputReader (reader_sp);
     }
diff --git a/source/API/SBFunction.cpp b/source/API/SBFunction.cpp
index 4f967b7..7ac447e 100644
--- a/source/API/SBFunction.cpp
+++ b/source/API/SBFunction.cpp
@@ -130,7 +130,7 @@
         TargetSP target_sp (target.GetSP());
         if (target_sp)
         {
-            api_locker.Lock (target_sp->GetAPIMutex().GetMutex());
+            api_locker.Lock (target_sp->GetAPIMutex());
             target_sp->CalculateExecutionContext (exe_ctx);
             exe_ctx.SetProcessSP(target_sp->GetProcessSP());
         }
diff --git a/source/API/SBInstruction.cpp b/source/API/SBInstruction.cpp
index 996b01d..0adb83e 100644
--- a/source/API/SBInstruction.cpp
+++ b/source/API/SBInstruction.cpp
@@ -78,7 +78,7 @@
         TargetSP target_sp (target.GetSP());
         if (target_sp)
         {
-            api_locker.Lock (target_sp->GetAPIMutex().GetMutex());
+            api_locker.Lock (target_sp->GetAPIMutex());
             target_sp->CalculateExecutionContext (exe_ctx);
             exe_ctx.SetProcessSP(target_sp->GetProcessSP());
         }
@@ -97,7 +97,7 @@
         TargetSP target_sp (target.GetSP());
         if (target_sp)
         {
-            api_locker.Lock (target_sp->GetAPIMutex().GetMutex());
+            api_locker.Lock (target_sp->GetAPIMutex());
             target_sp->CalculateExecutionContext (exe_ctx);
             exe_ctx.SetProcessSP(target_sp->GetProcessSP());
         }
@@ -116,7 +116,7 @@
         TargetSP target_sp (target.GetSP());
         if (target_sp)
         {
-            api_locker.Lock (target_sp->GetAPIMutex().GetMutex());
+            api_locker.Lock (target_sp->GetAPIMutex());
             target_sp->CalculateExecutionContext (exe_ctx);
             exe_ctx.SetProcessSP(target_sp->GetProcessSP());
         }
diff --git a/source/API/SBSymbol.cpp b/source/API/SBSymbol.cpp
index 89dff62..3fd06f8 100644
--- a/source/API/SBSymbol.cpp
+++ b/source/API/SBSymbol.cpp
@@ -126,7 +126,7 @@
         TargetSP target_sp (target.GetSP());
         if (target_sp)
         {
-            api_locker.Lock (target_sp->GetAPIMutex().GetMutex());
+            api_locker.Lock (target_sp->GetAPIMutex());
             target_sp->CalculateExecutionContext (exe_ctx);
         }
         if (m_opaque_ptr->ValueIsAddress())