summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-18 22:13:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-20 08:32:29 +0100
commit5f4a580ea13d34d7cc0ece0099dd2003612ca635 (patch)
tree7992c780dd1f9175a15639e84d6921f649b6a5f6 /io
parent8d29c5db519eb83b51f5a799759e4962c4a62487 (diff)
osl::Mutex->std::mutex in SocketConnection
Change-Id: Ifce8ab564c6f43f65ce02706b74f2c58d9b42bd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127123 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'io')
-rw-r--r--io/source/connector/connector.hxx5
-rw-r--r--io/source/connector/ctr_socket.cxx6
2 files changed, 6 insertions, 5 deletions
diff --git a/io/source/connector/connector.hxx b/io/source/connector/connector.hxx
index a9321932798e..691fc7a885df 100644
--- a/io/source/connector/connector.hxx
+++ b/io/source/connector/connector.hxx
@@ -27,6 +27,7 @@
#include <unordered_set>
#include <osl/socket.hxx>
#include <osl/pipe.hxx>
+#include <mutex>
namespace stoc_connector
{
@@ -80,12 +81,12 @@ namespace stoc_connector
oslInterlockedCount m_nStatus;
OUString m_sDescription;
- ::osl::Mutex _mutex;
+ std::mutex _mutex;
bool _started;
bool _closed;
bool _error;
- XStreamListener_hash_set _listeners;
+ XStreamListener_hash_set _listeners;
};
}
diff --git a/io/source/connector/ctr_socket.cxx b/io/source/connector/ctr_socket.cxx
index 98b4131be407..a171dc9e7d3b 100644
--- a/io/source/connector/ctr_socket.cxx
+++ b/io/source/connector/ctr_socket.cxx
@@ -35,7 +35,7 @@ namespace stoc_connector {
XStreamListener_hash_set listeners;
{
- ::osl::MutexGuard guard(pCon->_mutex);
+ std::unique_lock guard(pCon->_mutex);
if(!*notified)
{
*notified = true;
@@ -210,14 +210,14 @@ namespace stoc_connector {
// XConnectionBroadcaster
void SAL_CALL SocketConnection::addStreamListener(const Reference<XStreamListener> & aListener)
{
- MutexGuard guard(_mutex);
+ std::unique_lock guard(_mutex);
_listeners.insert(aListener);
}
void SAL_CALL SocketConnection::removeStreamListener(const Reference<XStreamListener> & aListener)
{
- MutexGuard guard(_mutex);
+ std::unique_lock guard(_mutex);
_listeners.erase(aListener);
}