summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-03-13 23:14:29 +0000
committerGreg Clayton <gclayton@apple.com>2012-03-13 23:14:29 +0000
commita174349960f8cf39f70919f5086c774ba5c84045 (patch)
tree51a099e87329db359fac8b19869cf3c99515c67d /lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
parentd5f8e5766c3dedf197f65effe77d23af7db3b32f (diff)
downloadbcm5719-llvm-a174349960f8cf39f70919f5086c774ba5c84045.tar.gz
bcm5719-llvm-a174349960f8cf39f70919f5086c774ba5c84045.zip
<rdar://problem/11034170>
Simplify the locking strategy for Module and its owned objects to always use the Module's mutex to avoid A/B deadlocks. We had a case where a symbol vendor was locking itself and then calling a function that would try to get it's Module's mutex and at the same time another thread had the Module mutex that was trying to get the SymbolVendor mutex. Now any classes that inherit from ModuleChild should use the module lock using code like: void ModuleChildSubclass::Function { ModuleSP module_sp(GetModule()); if (module_sp) { lldb_private::Mutex::Locker locker(module_sp->GetMutex()); ... do work here... } } This will help avoid deadlocks by using as few locks as possible for a module and all its child objects and also enforce detecting if a module has gone away (the ModuleSP will be returned empty if the weak_ptr does refer to a valid object anymore). llvm-svn: 152679
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h')
-rw-r--r--lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
index b717a06ae85..2e41ce4ff2b 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
@@ -12,7 +12,6 @@
#include <vector>
-#include "lldb/Host/Mutex.h"
#include "lldb/Symbol/ObjectFile.h"
class ObjectFilePECOFF :
@@ -228,7 +227,6 @@ protected:
typedef SectionHeaderColl::iterator SectionHeaderCollIter;
typedef SectionHeaderColl::const_iterator SectionHeaderCollConstIter;
private:
- mutable lldb_private::Mutex m_mutex;
mutable std::auto_ptr<lldb_private::SectionList> m_sections_ap;
mutable std::auto_ptr<lldb_private::Symtab> m_symtab_ap;
dos_header_t m_dos_header;
OpenPOWER on IntegriCloud