summaryrefslogtreecommitdiff
path: root/sal/rtl/ustring.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sal/rtl/ustring.cxx')
-rw-r--r--sal/rtl/ustring.cxx20
1 files changed, 1 insertions, 19 deletions
diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx
index 7940d5af1240..ff466ff72724 100644
--- a/sal/rtl/ustring.cxx
+++ b/sal/rtl/ustring.cxx
@@ -33,7 +33,6 @@
#include <osl/interlck.h>
#include <rtl/alloc.h>
#include <osl/mutex.h>
-#include <osl/doublecheckedlocking.h>
#include <rtl/tencinfo.h>
#include <string.h>
@@ -903,24 +902,7 @@ enum StrLifecycle {
static oslMutex
getInternMutex()
{
- static oslMutex pPoolGuard = nullptr;
- if( !pPoolGuard )
- {
- oslMutex pGlobalGuard;
- pGlobalGuard = *osl_getGlobalMutex();
- osl_acquireMutex( pGlobalGuard );
- if( !pPoolGuard )
- {
- oslMutex p = osl_createMutex();
- OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
- pPoolGuard = p;
- }
- osl_releaseMutex( pGlobalGuard );
- }
- else
- {
- OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
- }
+ static oslMutex pPoolGuard = osl_createMutex();
return pPoolGuard;
}