summaryrefslogtreecommitdiffstats
path: root/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-11-04 15:28:37 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-11-04 14:46:01 +0100
commite128f7806961b391cfb265a1ce009b2e036622ca (patch)
treeeda1097987f07ac6e2f507f898b71ddf929e0635 /bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx
parentreplace double-checked locking patterns with thread safe local statics (diff)
downloadcore-e128f7806961b391cfb265a1ce009b2e036622ca.tar.gz
core-e128f7806961b391cfb265a1ce009b2e036622ca.zip
replace double-checked locking patterns with thread safe local statics
Change-Id: I1bf67196e97411aeecc13ed4f91d1088a315e323 Reviewed-on: https://gerrit.libreoffice.org/62839 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx13
1 files changed, 2 insertions, 11 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx
index 9145071519ce..1241aa02e1eb 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx
@@ -222,17 +222,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
// destruct uno exception
::uno_any_destruct( pUnoExc, 0 );
// avoiding locked counts
- static RTTI * s_rtti = 0;
- if (! s_rtti)
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if (! s_rtti)
- {
- static RTTI rtti_data;
- s_rtti = &rtti_data;
- }
- }
- rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
+ static RTTI rtti_data;
+ rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr);
TYPELIB_DANGER_RELEASE( pTypeDescr );
if (! rtti)
terminate();