[Lldb-commits] [lldb] r181446 - Remove distinction between Apple/Linux for Process run locks:
Daniel Malea
daniel.malea at intel.com
Wed May 8 08:46:04 PDT 2013
Author: dmalea
Date: Wed May 8 10:46:04 2013
New Revision: 181446
URL: http://llvm.org/viewvc/llvm-project?rev=181446&view=rev
Log:
Remove distinction between Apple/Linux for Process run locks:
- Played with the current dual run lock implementation for a few days, noticed
no regressions, so enabling in trunk so we see if any problems are detected
by buildbots.
Modified:
lldb/trunk/include/lldb/Target/Process.h
lldb/trunk/source/Target/Process.cpp
Modified: lldb/trunk/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=181446&r1=181445&r2=181446&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Wed May 8 10:46:04 2013
@@ -3507,7 +3507,6 @@ public:
ReadWriteLock &
GetRunLock ()
{
-#if defined(__APPLE__)
// The "m_private_run_lock" causes problems for other platforms
// right now, so we are leaving this in for Apple builds only
// until we can get the kinks worked out.
@@ -3515,9 +3514,6 @@ public:
return m_private_run_lock;
else
return m_public_run_lock;
-#else
- return m_public_run_lock;
-#endif
}
protected:
@@ -3667,9 +3663,7 @@ protected:
std::unique_ptr<NextEventAction> m_next_event_action_ap;
std::vector<PreResumeCallbackAndBaton> m_pre_resume_actions;
ReadWriteLock m_public_run_lock;
-#if defined(__APPLE__)
ReadWriteLock m_private_run_lock;
-#endif
Predicate<bool> m_currently_handling_event; // This predicate is set in HandlePrivateEvent while all its business is being done.
bool m_currently_handling_do_on_removals;
bool m_resume_requested; // If m_currently_handling_event or m_currently_handling_do_on_removals are true, Resume will only request a resume, using this flag to check.
Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=181446&r1=181445&r2=181446&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Wed May 8 10:46:04 2013
@@ -559,7 +559,6 @@ ProcessLaunchInfo::ConvertArgumentsForLa
shell_command.PutCString ("exec");
-#if defined(__APPLE__)
// Only Apple supports /usr/bin/arch being able to specify the architecture
if (GetArchitecture().IsValid())
{
@@ -577,12 +576,6 @@ ProcessLaunchInfo::ConvertArgumentsForLa
// 2 - then we will stop in our program
SetResumeCount(1);
}
-#else
- // Set the resume count to 1:
- // 1 - stop in shell
- // 2 - then we will stop in our program
- SetResumeCount(1);
-#endif
}
if (first_arg_is_full_shell_command)
@@ -1038,9 +1031,7 @@ Process::Process(Target &target, Listene
m_should_detach (false),
m_next_event_action_ap(),
m_public_run_lock (),
-#if defined(__APPLE__)
m_private_run_lock (),
-#endif
m_currently_handling_event(false),
m_finalize_called(false),
m_last_broadcast_state (eStateInvalid),
@@ -1166,10 +1157,8 @@ Process::Finalize()
m_private_state_listener.Clear();
m_public_run_lock.WriteTryLock(); // This will do nothing if already locked
m_public_run_lock.WriteUnlock();
-#if defined(__APPLE__)
m_private_run_lock.WriteTryLock(); // This will do nothing if already locked
m_private_run_lock.WriteUnlock();
-#endif
m_finalize_called = true;
}
@@ -1718,7 +1707,6 @@ Process::SetPrivateState (StateType new_
// the private process state with another run lock. Right now it doesn't
// seem like we need to do this, but if we ever do, we can uncomment and
// use this code.
-#if defined(__APPLE__)
const bool old_state_is_stopped = StateIsStoppedState(old_state, false);
const bool new_state_is_stopped = StateIsStoppedState(new_state, false);
if (old_state_is_stopped != new_state_is_stopped)
@@ -1728,7 +1716,6 @@ Process::SetPrivateState (StateType new_
else
m_private_run_lock.WriteLock();
}
-#endif
if (state_changed)
{
More information about the lldb-commits
mailing list