io/source/acceptor/acceptor.cxx |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit e8b38f770012d2dad923c8a174ba4e9553db9afa
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sun May 8 12:51:17 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun May 8 19:56:03 2022 +0200

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

diff --git a/io/source/acceptor/acceptor.cxx b/io/source/acceptor/acceptor.cxx
index 79af13d385b9..af0883be9769 100644
--- a/io/source/acceptor/acceptor.cxx
+++ b/io/source/acceptor/acceptor.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <osl/mutex.hxx>
-
 #include <cppuhelper/implbase.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <cppuhelper/unourl.hxx>
@@ -33,6 +31,7 @@
 
 #include "acceptor.hxx"
 #include <memory>
+#include <mutex>
 #include <string_view>
 
 using namespace ::osl;
@@ -61,7 +60,7 @@ namespace {
     private:
         std::unique_ptr<io_acceptor::PipeAcceptor> m_pPipe;
         std::unique_ptr<io_acceptor::SocketAcceptor> m_pSocket;
-        Mutex m_mutex;
+        std::mutex m_mutex;
         OUString m_sLastDescription;
         bool m_bInAccept;
 
@@ -136,7 +135,7 @@ Reference< XConnection > OAcceptor::accept( const OUString 
&sConnectionDescripti
                 catch( ... )
                 {
                     {
-                        MutexGuard g( m_mutex );
+                        std::unique_lock g( m_mutex );
                         m_pPipe.reset();
                     }
                     throw;
@@ -169,7 +168,7 @@ Reference< XConnection > OAcceptor::accept( const OUString 
&sConnectionDescripti
                 catch( ... )
                 {
                     {
-                        MutexGuard g( m_mutex );
+                        std::unique_lock g( m_mutex );
                         m_pSocket.reset();
                     }
                     throw;
@@ -212,7 +211,7 @@ Reference< XConnection > OAcceptor::accept( const OUString 
&sConnectionDescripti
 
 void SAL_CALL OAcceptor::stopAccepting(  )
 {
-    MutexGuard guard( m_mutex );
+    std::unique_lock guard( m_mutex );
 
     if( m_pPipe )
     {

Reply via email to