summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
index 6e022515b2d7..242e2a476e23 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
@@ -21,6 +21,7 @@
#include <cassert>
#include <memory>
+#include <mutex>
#include <typeinfo>
#include <unordered_map>
#include <utility>
@@ -28,7 +29,6 @@
#include <dlfcn.h>
-#include <osl/mutex.hxx>
#include <rtl/strbuf.hxx>
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
@@ -74,7 +74,6 @@ class RTTI
{
typedef std::unordered_map< OUString, std::type_info * > t_rtti_map;
- osl::Mutex m_mutex;
t_rtti_map m_rttis;
std::vector<OString> m_rttiNames;
std::unordered_map<OUString, std::unique_ptr<Generated>> m_generatedRttis;
@@ -108,7 +107,6 @@ std::type_info * RTTI::getRTTI(typelib_TypeDescription const & pTypeDescr)
{
OUString const & unoName = OUString::unacquired(&pTypeDescr.pTypeName);
- osl::MutexGuard guard( m_mutex );
t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) );
if (iFind != m_rttis.end())
return iFind->second;
@@ -268,6 +266,8 @@ std::type_info * RTTI::getRTTI(typelib_TypeDescription const & pTypeDescr)
std::type_info * x86_64::getRtti(typelib_TypeDescription const & type) {
static RTTI theRttiFactory;
+ static std::mutex theMutex;
+ std::lock_guard aGuard(theMutex);
return theRttiFactory.getRTTI(type);
}