From d1f795167dba9ef7421a49a6e1be2f6cf2409df5 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 25 Aug 2017 12:00:45 +0200 Subject: Use osl_atomic_inc/decrement in --with-webdav=serf code, too Those were the last remaining raw uses of osl_inc/decrementInterlockedCount. Change-Id: I66d0d37a563106a0cc3edbd163462211893e3dae --- ucb/source/ucp/webdav/DAVSession.hxx | 4 ++-- ucb/source/ucp/webdav/DAVSessionFactory.cxx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'ucb') diff --git a/ucb/source/ucp/webdav/DAVSession.hxx b/ucb/source/ucp/webdav/DAVSession.hxx index 3ecbc618b317..34e431ac2d68 100644 --- a/ucb/source/ucp/webdav/DAVSession.hxx +++ b/ucb/source/ucp/webdav/DAVSession.hxx @@ -46,12 +46,12 @@ class DAVSession public: void acquire() { - osl_incrementInterlockedCount( &m_nRefCount ); + osl_atomic_increment( &m_nRefCount ); } void release() { - if ( osl_decrementInterlockedCount( &m_nRefCount ) == 0 ) + if ( osl_atomic_decrement( &m_nRefCount ) == 0 ) { m_xFactory->releaseElement( this ); delete this; diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.cxx b/ucb/source/ucp/webdav/DAVSessionFactory.cxx index 24f7a54580e9..587c649545ec 100644 --- a/ucb/source/ucp/webdav/DAVSessionFactory.cxx +++ b/ucb/source/ucp/webdav/DAVSessionFactory.cxx @@ -62,15 +62,15 @@ rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession( xElement.release(); return aIt->second; } - else if ( osl_incrementInterlockedCount( &aIt->second->m_nRefCount ) > 1 ) + else if ( osl_atomic_increment( &aIt->second->m_nRefCount ) > 1 ) { rtl::Reference< DAVSession > xElement( aIt->second ); - osl_decrementInterlockedCount( &aIt->second->m_nRefCount ); + osl_atomic_decrement( &aIt->second->m_nRefCount ); return xElement; } else { - osl_decrementInterlockedCount( &aIt->second->m_nRefCount ); + osl_atomic_decrement( &aIt->second->m_nRefCount ); aIt->second->m_aContainerIt = m_aMap.end(); // If URL scheme is different from http or https we definitely -- cgit