[Lldb-commits] [lldb] r211242 - Actually make a real scoped locker rather than constructing one that gets immediately thrown away...
Jim Ingham
jingham at apple.com
Wed Jun 18 16:40:13 PDT 2014
Author: jingham
Date: Wed Jun 18 18:40:13 2014
New Revision: 211242
URL: http://llvm.org/viewvc/llvm-project?rev=211242&view=rev
Log:
Actually make a real scoped locker rather than constructing one that gets immediately thrown away...
Modified:
lldb/trunk/source/Breakpoint/BreakpointSite.cpp
Modified: lldb/trunk/source/Breakpoint/BreakpointSite.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointSite.cpp?rev=211242&r1=211241&r2=211242&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointSite.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointSite.cpp Wed Jun 18 18:40:13 2014
@@ -61,7 +61,7 @@ BreakpointSite::GetNextID()
bool
BreakpointSite::ShouldStop (StoppointCallbackContext *context)
{
- Mutex::Locker(m_owners_mutex);
+ Mutex::Locker locker(m_owners_mutex);
IncrementHitCount();
return m_owners.ShouldStop (context);
}
@@ -69,7 +69,7 @@ BreakpointSite::ShouldStop (StoppointCal
bool
BreakpointSite::IsBreakpointAtThisSite (lldb::break_id_t bp_id)
{
- Mutex::Locker(m_owners_mutex);
+ Mutex::Locker locker(m_owners_mutex);
const size_t owner_count = m_owners.GetSize();
for (size_t i = 0; i < owner_count; i++)
{
@@ -96,7 +96,7 @@ BreakpointSite::Dump(Stream *s) const
void
BreakpointSite::GetDescription (Stream *s, lldb::DescriptionLevel level)
{
- Mutex::Locker(m_owners_mutex);
+ Mutex::Locker locker(m_owners_mutex);
if (level != lldb::eDescriptionLevelBrief)
s->Printf ("breakpoint site: %d at 0x%8.8" PRIx64, GetID(), GetLoadAddress());
m_owners.GetDescription (s, level);
@@ -105,7 +105,6 @@ BreakpointSite::GetDescription (Stream *
bool
BreakpointSite::IsInternal() const
{
- Mutex::Locker(m_owners_mutex);
return m_owners.IsInternal();
}
@@ -167,14 +166,14 @@ BreakpointSite::SetEnabled (bool enabled
void
BreakpointSite::AddOwner (const BreakpointLocationSP &owner)
{
- Mutex::Locker(m_owners_mutex);
+ Mutex::Locker locker(m_owners_mutex);
m_owners.Add(owner);
}
size_t
BreakpointSite::RemoveOwner (lldb::break_id_t break_id, lldb::break_id_t break_loc_id)
{
- Mutex::Locker(m_owners_mutex);
+ Mutex::Locker locker(m_owners_mutex);
m_owners.Remove(break_id, break_loc_id);
return m_owners.GetSize();
}
@@ -182,21 +181,21 @@ BreakpointSite::RemoveOwner (lldb::break
size_t
BreakpointSite::GetNumberOfOwners ()
{
- Mutex::Locker(m_owners_mutex);
+ Mutex::Locker locker(m_owners_mutex);
return m_owners.GetSize();
}
BreakpointLocationSP
BreakpointSite::GetOwnerAtIndex (size_t index)
{
- Mutex::Locker(m_owners_mutex);
+ Mutex::Locker locker(m_owners_mutex);
return m_owners.GetByIndex (index);
}
bool
BreakpointSite::ValidForThisThread (Thread *thread)
{
- Mutex::Locker(m_owners_mutex);
+ Mutex::Locker locker(m_owners_mutex);
return m_owners.ValidForThisThread(thread);
}
More information about the lldb-commits
mailing list