summaryrefslogtreecommitdiff
path: root/include/comphelper/solarmutex.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/comphelper/solarmutex.hxx')
-rw-r--r--include/comphelper/solarmutex.hxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/comphelper/solarmutex.hxx b/include/comphelper/solarmutex.hxx
index 0c147f405560..4094e08ee1f7 100644
--- a/include/comphelper/solarmutex.hxx
+++ b/include/comphelper/solarmutex.hxx
@@ -23,6 +23,8 @@
#include <sal/config.h>
#include <assert.h>
+#include <atomic>
+
#include <osl/thread.h>
#include <osl/mutex.hxx>
#include <comphelper/comphelperdllapi.h>
@@ -68,9 +70,10 @@ protected:
osl::Mutex m_aMutex;
sal_uInt32 m_nCount;
- oslThreadIdentifier m_nThreadId;
private:
+ std::atomic<oslThreadIdentifier> m_nThreadId;
+
SolarMutex(const SolarMutex&) = delete;
SolarMutex& operator=(const SolarMutex&) = delete;