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
This commit is contained in:
parent
74917e0c46
commit
d1f795167d
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user