diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-08-25 12:00:45 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-08-25 12:00:45 +0200 |
commit | d1f795167dba9ef7421a49a6e1be2f6cf2409df5 (patch) | |
tree | 6fa24a971c15d7890af8d35e76494ac16a3e9cb9 /ucb/source | |
parent | 74917e0c46dc61736f262aba911e5eb0decf4ec8 (diff) |
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
Diffstat (limited to 'ucb/source')
-rw-r--r-- | ucb/source/ucp/webdav/DAVSession.hxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVSessionFactory.cxx | 6 |
2 files changed, 5 insertions, 5 deletions
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 |