vcl/inc/unx/gtk/gtkdata.hxx |    2 +-
 vcl/unx/gtk3/gtkdata.cxx    |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit acf37c3a0b54a46de29bafd27ec9b0618bd2d84a
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Feb 15 15:59:57 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Feb 16 06:26:22 2023 +0000

    osl::Mutex->std::mutex in GtkSalData
    
    Change-Id: I86fdee3310715256a76f2b6560d27d3302402ab9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147102
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 3a1a9094d3ec..39cb7907ae7f 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -278,7 +278,7 @@ public:
 class GtkSalData final : public GenericUnixSalData
 {
     GSource*        m_pUserEvent;
-    osl::Mutex      m_aDispatchMutex;
+    std::mutex      m_aDispatchMutex;
     osl::Condition  m_aDispatchCondition;
     std::exception_ptr m_aException;
 
diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx
index cc8535ff2ad2..1fb5c1edfe1f 100644
--- a/vcl/unx/gtk3/gtkdata.cxx
+++ b/vcl/unx/gtk3/gtkdata.cxx
@@ -358,7 +358,7 @@ GtkSalData::~GtkSalData()
     // up anyway before the condition they're waiting on gets destroyed.
     m_aDispatchCondition.set();
 
-    osl::MutexGuard g( m_aDispatchMutex );
+    std::unique_lock g( m_aDispatchMutex );
     if (m_pUserEvent)
     {
         g_source_destroy (m_pUserEvent);
@@ -389,7 +389,7 @@ bool GtkSalData::Yield( bool bWait, bool 
bHandleAllCurrentEvents )
     {
         // release YieldMutex (and re-acquire at block end)
         SolarMutexReleaser aReleaser;
-        if( m_aDispatchMutex.tryToAcquire() )
+        if( m_aDispatchMutex.try_lock() )
             bDispatchThread = true;
         else if( ! bWait )
         {
@@ -423,7 +423,7 @@ bool GtkSalData::Yield( bool bWait, bool 
bHandleAllCurrentEvents )
 
     if( bDispatchThread )
     {
-        m_aDispatchMutex.release();
+        m_aDispatchMutex.unlock();
         if( bWasEvent )
             m_aDispatchCondition.set(); // trigger non dispatch thread yields
     }

Reply via email to