summaryrefslogtreecommitdiff
path: root/basic/source/runtime/basrdll.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/runtime/basrdll.cxx')
-rw-r--r--basic/source/runtime/basrdll.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx
index 29cd292e2bdf..ba94fd7b9d2b 100644
--- a/basic/source/runtime/basrdll.cxx
+++ b/basic/source/runtime/basrdll.cxx
@@ -18,6 +18,8 @@
*/
#include <memory>
+#include <mutex>
+
#include <vcl/svapp.hxx>
#include <tools/debug.hxx>
#include <vcl/weld.hxx>
@@ -44,9 +46,9 @@ struct BasicDLLImpl : public SvRefBase
{ }
static BasicDLLImpl* BASIC_DLL;
- static osl::Mutex& getMutex()
+ static std::mutex& getMutex()
{
- static osl::Mutex aMutex;
+ static std::mutex aMutex;
return aMutex;
}
};
@@ -56,7 +58,7 @@ BasicDLLImpl* BasicDLLImpl::BASIC_DLL = nullptr;
BasicDLL::BasicDLL()
{
- osl::MutexGuard aGuard(BasicDLLImpl::getMutex());
+ std::scoped_lock aGuard(BasicDLLImpl::getMutex());
if (!BasicDLLImpl::BASIC_DLL)
BasicDLLImpl::BASIC_DLL = new BasicDLLImpl;
m_xImpl = BasicDLLImpl::BASIC_DLL;
@@ -64,7 +66,7 @@ BasicDLL::BasicDLL()
BasicDLL::~BasicDLL()
{
- osl::MutexGuard aGuard(BasicDLLImpl::getMutex());
+ std::scoped_lock aGuard(BasicDLLImpl::getMutex());
const bool bLastRef = m_xImpl->GetRefCount() == 1;
if (bLastRef) {
BasicDLLImpl::BASIC_DLL->xSbxAppData->m_aGlobErr.clear();