summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-09-22 01:51:12 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-09-25 01:55:38 +0000
commit750fc206113a796035cbc05fb904fbae0eb771a8 (patch)
tree4ea1f0378c2b6d7f50480d3b9051de91780219cd /connectivity
parentbcd2b017088822ea95e9d33d1d0dc360c0ec8d74 (diff)
replace remaining InterlockedCount() with inlined version
Change-Id: Ifcfa48fc87f905a91470a5b0fd597b02f220784c Reviewed-on: https://gerrit.libreoffice.org/671 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/inc/connectivity/CommonTools.hxx4
-rw-r--r--connectivity/source/commontools/ConnectionWrapper.cxx8
-rw-r--r--connectivity/source/commontools/TDatabaseMetaDataBase.cxx4
-rw-r--r--connectivity/source/commontools/TPrivilegesResultSet.cxx4
-rw-r--r--connectivity/source/commontools/dbtools.cxx6
-rw-r--r--connectivity/source/cpool/ZConnectionWrapper.cxx2
-rw-r--r--connectivity/source/cpool/ZDriverWrapper.cxx4
-rw-r--r--connectivity/source/cpool/ZPoolCollection.cxx4
-rw-r--r--connectivity/source/drivers/ado/AConnection.cxx10
-rw-r--r--connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx4
-rw-r--r--connectivity/source/drivers/ado/APreparedStatement.cxx4
-rw-r--r--connectivity/source/drivers/ado/AResultSet.cxx6
-rw-r--r--connectivity/source/drivers/ado/AStatement.cxx4
-rw-r--r--connectivity/source/drivers/calc/CConnection.cxx6
-rw-r--r--connectivity/source/drivers/evoab2/NConnection.cxx4
-rw-r--r--connectivity/source/drivers/file/FConnection.cxx6
-rw-r--r--connectivity/source/drivers/file/FResultSet.cxx6
-rw-r--r--connectivity/source/drivers/file/FStatement.cxx2
-rw-r--r--connectivity/source/drivers/flat/EConnection.cxx4
-rw-r--r--connectivity/source/drivers/hsqldb/HConnection.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/ConnectionLog.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/Object.cxx4
-rw-r--r--connectivity/source/drivers/jdbc/ResultSet.cxx6
-rw-r--r--connectivity/source/drivers/kab/KConnection.cxx4
-rw-r--r--connectivity/source/drivers/kab/KDatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/kab/KDriver.cxx4
-rw-r--r--connectivity/source/drivers/macab/MacabConnection.cxx4
-rw-r--r--connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/macab/MacabDriver.cxx4
-rw-r--r--connectivity/source/drivers/mork/MCatalog.cxx4
-rw-r--r--connectivity/source/drivers/mozab/MCatalog.cxx4
-rw-r--r--connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx6
-rw-r--r--connectivity/source/drivers/odbcbase/OResultSet.cxx8
-rw-r--r--connectivity/source/drivers/odbcbase/OStatement.cxx4
-rw-r--r--connectivity/source/resource/sharedresources.cxx4
-rw-r--r--connectivity/source/simpledbt/refbase.cxx4
37 files changed, 84 insertions, 84 deletions
diff --git a/connectivity/inc/connectivity/CommonTools.hxx b/connectivity/inc/connectivity/CommonTools.hxx
index ac1c0d9738d3..6a1dfc9de9ad 100644
--- a/connectivity/inc/connectivity/CommonTools.hxx
+++ b/connectivity/inc/connectivity/CommonTools.hxx
@@ -101,11 +101,11 @@ namespace connectivity
void acquire()
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
}
void release()
{
- if (! osl_decrementInterlockedCount( &m_refCount ))
+ if (! osl_atomic_decrement( &m_refCount ))
delete this;
}
diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx
index 79df7866e261..7b3f14f235f9 100644
--- a/connectivity/source/commontools/ConnectionWrapper.cxx
+++ b/connectivity/source/commontools/ConnectionWrapper.cxx
@@ -45,7 +45,7 @@ OConnectionWrapper::OConnectionWrapper()
void OConnectionWrapper::setDelegation(Reference< XAggregation >& _rxProxyConnection,oslInterlockedCount& _rRefCount)
{
OSL_ENSURE(_rxProxyConnection.is(),"OConnectionWrapper: Connection must be valid!");
- osl_incrementInterlockedCount( &_rRefCount );
+ osl_atomic_increment( &_rRefCount );
if (_rxProxyConnection.is())
{
// transfer the (one and only) real ref to the aggregate to our member
@@ -61,7 +61,7 @@ void OConnectionWrapper::setDelegation(Reference< XAggregation >& _rxProxyConnec
m_xProxyConnection->setDelegator( xIf );
}
- osl_decrementInterlockedCount( &_rRefCount );
+ osl_atomic_decrement( &_rRefCount );
}
// -----------------------------------------------------------------------------
void OConnectionWrapper::setDelegation(const Reference< XConnection >& _xConnection
@@ -69,7 +69,7 @@ void OConnectionWrapper::setDelegation(const Reference< XConnection >& _xConnect
,oslInterlockedCount& _rRefCount)
{
OSL_ENSURE(_xConnection.is(),"OConnectionWrapper: Connection must be valid!");
- osl_incrementInterlockedCount( &_rRefCount );
+ osl_atomic_increment( &_rRefCount );
m_xConnection = _xConnection;
m_xTypeProvider.set(m_xConnection,UNO_QUERY);
@@ -88,7 +88,7 @@ void OConnectionWrapper::setDelegation(const Reference< XConnection >& _xConnect
m_xProxyConnection->setDelegator( xIf );
}
- osl_decrementInterlockedCount( &_rRefCount );
+ osl_atomic_decrement( &_rRefCount );
}
// -----------------------------------------------------------------------------
void OConnectionWrapper::disposing()
diff --git a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx
index 1d10e77ad7c7..f72748ea5c17 100644
--- a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx
+++ b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx
@@ -54,14 +54,14 @@ ODatabaseMetaDataBase::ODatabaseMetaDataBase(const Reference< XConnection >& _rx
,m_storesMixedCaseQuotedIdentifiers(false,sal_False)
, m_xConnection(_rxConnection)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_xListenerHelper = new OEventListenerHelper(this);
Reference<XComponent> xCom(m_xConnection,UNO_QUERY);
if(xCom.is())
xCom->addEventListener(m_xListenerHelper);
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
ODatabaseMetaDataBase::~ODatabaseMetaDataBase()
diff --git a/connectivity/source/commontools/TPrivilegesResultSet.cxx b/connectivity/source/commontools/TPrivilegesResultSet.cxx
index ce5f4466d0c3..f911f3e3e298 100644
--- a/connectivity/source/commontools/TPrivilegesResultSet.cxx
+++ b/connectivity/source/commontools/TPrivilegesResultSet.cxx
@@ -35,7 +35,7 @@ OResultSetPrivileges::OResultSetPrivileges( const Reference< XDatabaseMetaData>&
: ODatabaseMetaDataResultSet(eTablePrivileges)
, m_bResetValues(sal_True)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
::rtl::OUString sUserWorkingFor;
Sequence< ::rtl::OUString > sTableTypes(3);
@@ -79,7 +79,7 @@ OResultSetPrivileges::OResultSetPrivileges( const Reference< XDatabaseMetaData>&
setRows(aRows);
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------------------
const ORowSetValue& OResultSetPrivileges::getValue(sal_Int32 columnIndex)
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 96639c641a09..f175c3ed5a66 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -2063,9 +2063,9 @@ void release(oslInterlockedCount& _refCount,
Reference< XInterface >& _xInterface,
::com::sun::star::lang::XComponent* _pObject)
{
- if (osl_decrementInterlockedCount( &_refCount ) == 0)
+ if (osl_atomic_decrement( &_refCount ) == 0)
{
- osl_incrementInterlockedCount( &_refCount );
+ osl_atomic_increment( &_refCount );
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
{
@@ -2095,7 +2095,7 @@ void release(oslInterlockedCount& _refCount,
}
}
else
- osl_incrementInterlockedCount( &_refCount );
+ osl_atomic_increment( &_refCount );
}
void checkDisposed(sal_Bool _bThrow) throw ( DisposedException )
diff --git a/connectivity/source/cpool/ZConnectionWrapper.cxx b/connectivity/source/cpool/ZConnectionWrapper.cxx
index ada53c1dec94..5666afce188c 100644
--- a/connectivity/source/cpool/ZConnectionWrapper.cxx
+++ b/connectivity/source/cpool/ZConnectionWrapper.cxx
@@ -43,7 +43,7 @@ OConnectionWeakWrapper::~OConnectionWeakWrapper()
{
if ( !OConnectionWeakWrapper_BASE::rBHelper.bDisposed )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/connectivity/source/cpool/ZDriverWrapper.cxx b/connectivity/source/cpool/ZDriverWrapper.cxx
index d2d71262c005..12887634dec5 100644
--- a/connectivity/source/cpool/ZDriverWrapper.cxx
+++ b/connectivity/source/cpool/ZDriverWrapper.cxx
@@ -43,7 +43,7 @@ namespace connectivity
if (m_pConnectionPool)
m_pConnectionPool->acquire();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
if (_rxAggregateDriver.is())
{
// transfer the (one and only) real ref to the aggregate to our member
@@ -57,7 +57,7 @@ namespace connectivity
// set ourself as delegator
m_xDriverAggregate->setDelegator( static_cast< XWeak* >( this ) );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index 9b7fa7370a6f..7740379990e6 100644
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -88,7 +88,7 @@ OPoolCollection::OPoolCollection(const Reference< XMultiServiceFactory >& _rxF
if ( xProp.is() )
xProp->addPropertyChangeListener(getEnablePoolingNodeName(),this);
// attach as desktop listener to know when we have to release our pools
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_xDesktop = Reference< ::com::sun::star::frame::XDesktop>( m_xServiceFactory->createInstance(::rtl::OUString("com.sun.star.frame.Desktop") ), UNO_QUERY);
@@ -96,7 +96,7 @@ OPoolCollection::OPoolCollection(const Reference< XMultiServiceFactory >& _rxF
m_xDesktop->addTerminateListener(this);
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
OPoolCollection::~OPoolCollection()
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index f893bcad2a88..2b24b24d67ed 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -56,7 +56,7 @@ OConnection::OConnection(ODriver* _pDriver) throw(SQLException, RuntimeExcepti
m_bClosed(sal_False),
m_bAutocommit(sal_True)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
IClassFactory2* pIUnknown = NULL;
IUnknown *pOuter = NULL;
@@ -90,7 +90,7 @@ OConnection::OConnection(ODriver* _pDriver) throw(SQLException, RuntimeExcepti
pIUnknown->Release();
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//-----------------------------------------------------------------------------
OConnection::~OConnection()
@@ -99,7 +99,7 @@ OConnection::~OConnection()
//-----------------------------------------------------------------------------
void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyValue >& info)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
setConnectionInfo(info);
@@ -152,10 +152,10 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
}
catch(const Exception& )
{
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
throw;
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//-----------------------------------------------------------------------------
void SAL_CALL OConnection::release() throw()
diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
index 31bb5ec36fe5..61ec5d5f6e43 100644
--- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
@@ -60,7 +60,7 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet(ADORecordset* _pRecordSet
,m_bEOF(sal_False)
,m_bOnFirstAfterOpen(sal_False)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_aColMapping.push_back(-1);
if(_pRecordSet)
{
@@ -71,7 +71,7 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet(ADORecordset* _pRecordSet
}
else
m_bOnFirstAfterOpen = sal_False;
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
// allocBuffer();
}
diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx
index d12d0c2179aa..fd1e0b196b92 100644
--- a/connectivity/source/drivers/ado/APreparedStatement.cxx
+++ b/connectivity/source/drivers/ado/APreparedStatement.cxx
@@ -57,7 +57,7 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OTypeInf
: OStatement_Base( _pConnection )
,m_aTypeInfo(_TypeInfo)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
OSQLParser aParser(_pConnection->getDriver()->getORB());
::rtl::OUString sErrorMessage;
@@ -80,7 +80,7 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OTypeInf
m_pParameters->AddRef();
m_pParameters->Refresh();
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/ado/AResultSet.cxx b/connectivity/source/drivers/ado/AResultSet.cxx
index b1dc8729859b..2e10ea9e6f96 100644
--- a/connectivity/source/drivers/ado/AResultSet.cxx
+++ b/connectivity/source/drivers/ado/AResultSet.cxx
@@ -104,19 +104,19 @@ OResultSet::OResultSet(ADORecordset* _pRecordSet) : OResultSet_BASE(m_aMutex)
// -----------------------------------------------------------------------------
void OResultSet::construct()
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
if (!m_pRecordSet)
{
OSL_FAIL( "OResultSet::construct: no RecordSet!" );
Reference< XInterface > xInt( *this );
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
::dbtools::throwFunctionSequenceException( xInt );
}
m_pRecordSet->AddRef();
VARIANT_BOOL bIsAtBOF;
CHECK_RETURN(m_pRecordSet->get_BOF(&bIsAtBOF))
m_bOnFirstAfterOpen = bIsAtBOF != VARIANT_TRUE;
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
OResultSet::~OResultSet()
diff --git a/connectivity/source/drivers/ado/AStatement.cxx b/connectivity/source/drivers/ado/AStatement.cxx
index cf0e8c6886b1..71e9d4d8094b 100644
--- a/connectivity/source/drivers/ado/AStatement.cxx
+++ b/connectivity/source/drivers/ado/AStatement.cxx
@@ -61,7 +61,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection ) : OStatement_BASE(
,m_eLockType(adLockReadOnly)
,m_eCursorType(adOpenForwardOnly)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_Command.Create();
if(m_Command.IsValid())
@@ -74,7 +74,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection ) : OStatement_BASE(
m_pConnection->acquire();
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------------------
void OStatement_Base::disposeResultSet()
diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx
index ab7d60f4fcd0..6576fc1a729b 100644
--- a/connectivity/source/drivers/calc/CConnection.cxx
+++ b/connectivity/source/drivers/calc/CConnection.cxx
@@ -108,7 +108,7 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcConnection::acquireDoc" );
if ( m_xDoc.is() )
{
- osl_incrementInterlockedCount(&m_nDocCount);
+ osl_atomic_increment(&m_nDocCount);
return m_xDoc;
}
// open read-only as long as updating isn't implemented
@@ -172,14 +172,14 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc()
) );
::dbtools::throwGenericSQLException( sError, *this, aErrorDetails );
}
- osl_incrementInterlockedCount(&m_nDocCount);
+ osl_atomic_increment(&m_nDocCount);
return m_xDoc;
}
// -----------------------------------------------------------------------------
void OCalcConnection::releaseDoc()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcConnection::releaseDoc" );
- if ( osl_decrementInterlockedCount(&m_nDocCount) == 0 )
+ if ( osl_atomic_decrement(&m_nDocCount) == 0 )
::comphelper::disposeComponent( m_xDoc );
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx
index 5d1140f72673..528508d1da01 100644
--- a/connectivity/source/drivers/evoab2/NConnection.cxx
+++ b/connectivity/source/drivers/evoab2/NConnection.cxx
@@ -95,7 +95,7 @@ IMPLEMENT_SERVICE_INFO(OEvoabConnection, "com.sun.star.sdbc.drivers.evoab.Connec
//-----------------------------------------------------------------------------
void OEvoabConnection::construct(const ::rtl::OUString& url, const Sequence< PropertyValue >& info) throw(SQLException)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
SAL_INFO("evoab2", "OEvoabConnection::construct()::url = " << url );
::rtl::OUString sPassword;
@@ -120,7 +120,7 @@ void OEvoabConnection::construct(const ::rtl::OUString& url, const Sequence< Pro
setSDBCAddressType(SDBCAddress::EVO_LOCAL);
setURL(url);
setPassword(::rtl::OUStringToOString(sPassword,RTL_TEXTENCODING_UTF8));
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// --------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index 2fa26d5b3a95..5f0beab19a8f 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -96,7 +96,7 @@ sal_Bool OConnection::matchesExtension( const String& _rExt ) const
//-----------------------------------------------------------------------------
void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyValue >& info) throw(SQLException)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
::rtl::OUString aExt;
const PropertyValue *pIter = info.getConstArray();
@@ -206,11 +206,11 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
}
catch(const Exception&)
{
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
throw;
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// XServiceInfo
// --------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 43c23e828921..33b9f65f3282 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -116,7 +116,7 @@ OResultSet::OResultSet(OStatement_Base* pStmt,OSQLParseTreeIterator& _aSQLIte
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::OResultSet" );
DBG_CTOR( file_OResultSet, NULL );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_bIsCount = (m_pParseTree &&
m_pParseTree->count() > 2 &&
SQL_ISRULE(m_pParseTree->getChild(2),scalar_exp_commalist) &&
@@ -128,14 +128,14 @@ OResultSet::OResultSet(OStatement_Base* pStmt,OSQLParseTreeIterator& _aSQLIte
m_nResultSetConcurrency = isCount() ? ResultSetConcurrency::READ_ONLY : ResultSetConcurrency::UPDATABLE;
construct();
m_aSkipDeletedSet.SetDeletedVisible(m_bShowDeleted);
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
OResultSet::~OResultSet()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::~OResultSet" );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
disposing();
DBG_DTOR( file_OResultSet, NULL );
}
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index 5667260e73ca..c606bbfe9dfc 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -95,7 +95,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection )
// -----------------------------------------------------------------------------
OStatement_Base::~OStatement_Base()
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
disposing();
delete m_pSQLAnalyzer;
diff --git a/connectivity/source/drivers/flat/EConnection.cxx b/connectivity/source/drivers/flat/EConnection.cxx
index e28a82fa2b19..8122f4cb0e58 100644
--- a/connectivity/source/drivers/flat/EConnection.cxx
+++ b/connectivity/source/drivers/flat/EConnection.cxx
@@ -61,7 +61,7 @@ IMPLEMENT_SERVICE_INFO(OFlatConnection, "com.sun.star.sdbc.drivers.flat.Connecti
//-----------------------------------------------------------------------------
void OFlatConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyValue >& info) throw(SQLException)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
const PropertyValue *pBegin = info.getConstArray();
const PropertyValue *pEnd = pBegin + info.getLength();
@@ -99,7 +99,7 @@ void OFlatConnection::construct(const ::rtl::OUString& url,const Sequence< Prope
}
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
OConnection::construct(url,info);
m_bShowDeleted = sal_True; // we do not supported rows for this type
}
diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx
index 685db4c6f1a4..2d447af76467 100644
--- a/connectivity/source/drivers/hsqldb/HConnection.cxx
+++ b/connectivity/source/drivers/hsqldb/HConnection.cxx
@@ -133,7 +133,7 @@ namespace connectivity { namespace hsqldb
{
if ( !OHsqlConnection_BASE::rBHelper.bDisposed )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/connectivity/source/drivers/jdbc/ConnectionLog.cxx b/connectivity/source/drivers/jdbc/ConnectionLog.cxx
index 2a43f9bef2e0..4afc43a21a21 100644
--- a/connectivity/source/drivers/jdbc/ConnectionLog.cxx
+++ b/connectivity/source/drivers/jdbc/ConnectionLog.cxx
@@ -41,7 +41,7 @@ namespace connectivity { namespace java { namespace sql {
sal_Int32 lcl_getFreeID( ConnectionLog::ObjectType _eType )
{
static oslInterlockedCount s_nCounts[ ConnectionLog::ObjectTypeCount ] = { 0, 0 };
- return osl_incrementInterlockedCount( s_nCounts + _eType );
+ return osl_atomic_increment( s_nCounts + _eType );
}
}
diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx
index 4d0bdc98fab0..5f1093a3691f 100644
--- a/connectivity/source/drivers/jdbc/Object.cxx
+++ b/connectivity/source/drivers/jdbc/Object.cxx
@@ -79,12 +79,12 @@ oslInterlockedCount& getJavaVMRefCount()
// -----------------------------------------------------------------------------
void SDBThreadAttach::addRef()
{
- osl_incrementInterlockedCount(&getJavaVMRefCount());
+ osl_atomic_increment(&getJavaVMRefCount());
}
// -----------------------------------------------------------------------------
void SDBThreadAttach::releaseRef()
{
- osl_decrementInterlockedCount(&getJavaVMRefCount());
+ osl_atomic_decrement(&getJavaVMRefCount());
if ( getJavaVMRefCount() == 0 )
{
getJavaVM2(::rtl::Reference< jvmaccess::VirtualMachine >(),sal_True);
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx
index 160edcda3960..035b3306e219 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -72,11 +72,11 @@ java_sql_ResultSet::java_sql_ResultSet( JNIEnv * pEnv, jobject myObj, const java
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::java_sql_ResultSet" );
SDBThreadAttach::addRef();
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
if ( pStmt )
m_xStatement = *pStmt;
- osl_decrementInterlockedCount(&m_refCount);
+ osl_atomic_decrement(&m_refCount);
}
// -----------------------------------------------------------------------------
java_sql_ResultSet::~java_sql_ResultSet()
@@ -84,7 +84,7 @@ java_sql_ResultSet::~java_sql_ResultSet()
if ( !java_sql_ResultSet_BASE::rBHelper.bDisposed && !java_sql_ResultSet_BASE::rBHelper.bInDispose )
{
// increment ref count to prevent double call of Dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/connectivity/source/drivers/kab/KConnection.cxx b/connectivity/source/drivers/kab/KConnection.cxx
index 95e66426aa34..ffabd1e1c42c 100644
--- a/connectivity/source/drivers/kab/KConnection.cxx
+++ b/connectivity/source/drivers/kab/KConnection.cxx
@@ -63,7 +63,7 @@ void SAL_CALL KabConnection::release() throw()
// -----------------------------------------------------------------------------
void KabConnection::construct(const ::rtl::OUString&, const Sequence< PropertyValue >&) throw(SQLException)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
// create a KDE address book object
m_pAddressBook = KABC::StdAddressBook::self();
@@ -71,7 +71,7 @@ void KabConnection::construct(const ::rtl::OUString&, const Sequence< PropertyVa
// perharps we should analyze the URL to know whether the addressbook is local, over LDAP, etc...
// perharps we should get some user and password information from "info" properties
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// XServiceInfo
// --------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
index 7283b9854e4a..304ef30d0833 100644
--- a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
@@ -40,9 +40,9 @@ KabDatabaseMetaData::KabDatabaseMetaData(KabConnection* _pCon)
{
OSL_ENSURE(_pCon,"KabDatabaseMetaData::KabDatabaseMetaData: No connection set!");
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable());
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
KabDatabaseMetaData::~KabDatabaseMetaData()
diff --git a/connectivity/source/drivers/kab/KDriver.cxx b/connectivity/source/drivers/kab/KDriver.cxx
index 88c3702a3aef..04ee1195631d 100644
--- a/connectivity/source/drivers/kab/KDriver.cxx
+++ b/connectivity/source/drivers/kab/KDriver.cxx
@@ -311,7 +311,7 @@ KabDriver::KabDriver(
if ( !m_xMSFactory.is() )
throw NullPointerException();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
try
{
Reference< XDesktop > xDesktop(
@@ -323,7 +323,7 @@ KabDriver::KabDriver(
{
DBG_UNHANDLED_EXCEPTION();
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// --------------------------------------------------------------------------------
void KabDriver::disposing()
diff --git a/connectivity/source/drivers/macab/MacabConnection.cxx b/connectivity/source/drivers/macab/MacabConnection.cxx
index f546d26c1135..5b4db40ff89d 100644
--- a/connectivity/source/drivers/macab/MacabConnection.cxx
+++ b/connectivity/source/drivers/macab/MacabConnection.cxx
@@ -61,12 +61,12 @@ void SAL_CALL MacabConnection::release() throw()
// -----------------------------------------------------------------------------
void MacabConnection::construct(const ::rtl::OUString&, const Sequence< PropertyValue >&) throw(SQLException)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
// get the Mac OS X shared address book
m_pAddressBook = new MacabAddressBook();
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// XServiceInfo
// --------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
index 994f67db33ed..7ce636312732 100644
--- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
@@ -45,9 +45,9 @@ MacabDatabaseMetaData::MacabDatabaseMetaData(MacabConnection* _pCon)
{
OSL_ENSURE(_pCon,"MacabDatabaseMetaData::MacabDatabaseMetaData: No connection set!");
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable());
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
MacabDatabaseMetaData::~MacabDatabaseMetaData()
diff --git a/connectivity/source/drivers/macab/MacabDriver.cxx b/connectivity/source/drivers/macab/MacabDriver.cxx
index 9c318ad2c128..be82f62549f3 100644
--- a/connectivity/source/drivers/macab/MacabDriver.cxx
+++ b/connectivity/source/drivers/macab/MacabDriver.cxx
@@ -180,7 +180,7 @@ MacabDriver::MacabDriver(
if ( !m_xMSFactory.is() )
throw NullPointerException();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
try
{
Reference< XDesktop > xDesktop(
@@ -192,7 +192,7 @@ MacabDriver::MacabDriver(
{
DBG_UNHANDLED_EXCEPTION();
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// --------------------------------------------------------------------------------
void MacabDriver::disposing()
diff --git a/connectivity/source/drivers/mork/MCatalog.cxx b/connectivity/source/drivers/mork/MCatalog.cxx
index 005037c13adc..87edf95eac10 100644
--- a/connectivity/source/drivers/mork/MCatalog.cxx
+++ b/connectivity/source/drivers/mork/MCatalog.cxx
@@ -39,12 +39,12 @@ OCatalog::OCatalog(OConnection* _pCon) : connectivity::sdbcx::OCatalog(_pCon)
,m_pConnection(_pCon)
,m_xMetaData(m_pConnection->getMetaData( ))
{
-// osl_incrementInterlockedCount( &m_refCount );
+// osl_atomic_increment( &m_refCount );
// refreshTables();
// refreshViews();
// refreshGroups();
// refreshUsers();
-// osl_decrementInterlockedCount( &m_refCount );
+// osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
void OCatalog::refreshTables()
diff --git a/connectivity/source/drivers/mozab/MCatalog.cxx b/connectivity/source/drivers/mozab/MCatalog.cxx
index 1b0c05a17fed..c08bae179398 100644
--- a/connectivity/source/drivers/mozab/MCatalog.cxx
+++ b/connectivity/source/drivers/mozab/MCatalog.cxx
@@ -39,12 +39,12 @@ OCatalog::OCatalog(OConnection* _pCon) : connectivity::sdbcx::OCatalog(_pCon)
,m_pConnection(_pCon)
,m_xMetaData(m_pConnection->getMetaData( ))
{
-// osl_incrementInterlockedCount( &m_refCount );
+// osl_atomic_increment( &m_refCount );
// refreshTables();
// refreshViews();
// refreshGroups();
// refreshUsers();
-// osl_decrementInterlockedCount( &m_refCount );
+// osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
void OCatalog::refreshTables()
diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx
index fd4b5b1c237d..45d891fa3a5b 100644
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx
@@ -46,7 +46,7 @@ ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle,OConnection* _pCon
OSL_ENSURE(m_pConnection,"ODatabaseMetaData::ODatabaseMetaData: No connection set!");
if(!m_pConnection->isCatalogUsed())
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
try
{
m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable());
@@ -56,7 +56,7 @@ ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle,OConnection* _pCon
catch(SQLException& )
{ // doesn't matter here
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
index 37040d4372a2..c8e4156e7cd7 100644
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
@@ -71,10 +71,10 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet(OConnection* _pConnection
if( SQL_NULL_HANDLE == m_aStatementHandle )
throw RuntimeException();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_pConnection->acquire();
m_pRowStatusArray = new SQLUSMALLINT[1]; // the default value
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
// allocBuffer();
}
@@ -84,7 +84,7 @@ ODatabaseMetaDataResultSet::~ODatabaseMetaDataResultSet()
OSL_ENSURE(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed,"Object wasn't disposed!");
if(!ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
delete [] m_pRowStatusArray;
diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx
index ccb45e5ebf52..7cfebcb23f4d 100644
--- a/connectivity/source/drivers/odbcbase/OResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx
@@ -105,7 +105,7 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) :
,m_bRowDeleted(sal_False)
,m_bUseFetchScroll(sal_False)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
try
{
m_pRowStatusArray = new SQLUSMALLINT[1]; // the default value
@@ -149,7 +149,7 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) :
m_bUseFetchScroll = sal_False;
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
OResultSet::~OResultSet()
@@ -160,9 +160,9 @@ OResultSet::~OResultSet()
// -----------------------------------------------------------------------------
void OResultSet::construct()
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
allocBuffer();
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
void OResultSet::disposing(void)
diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx b/connectivity/source/drivers/odbcbase/OStatement.cxx
index ce92dee3fc0f..fabc0f26e7ef 100644
--- a/connectivity/source/drivers/odbcbase/OStatement.cxx
+++ b/connectivity/source/drivers/odbcbase/OStatement.cxx
@@ -66,7 +66,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection )
,m_pRowStatusArray(0)
,rBHelper(OStatement_BASE::rBHelper)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_pConnection->acquire();
m_aStatementHandle = m_pConnection->createStatementHandle();
@@ -80,7 +80,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection )
// If we ever again encounter a ODBC driver which needs this option, then we should introduce a data source
// setting for it, instead of unconditionally doing it.
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
OStatement_Base::~OStatement_Base()
diff --git a/connectivity/source/resource/sharedresources.cxx b/connectivity/source/resource/sharedresources.cxx
index 1fc4a66f5272..246591063547 100644
--- a/connectivity/source/resource/sharedresources.cxx
+++ b/connectivity/source/resource/sharedresources.cxx
@@ -110,14 +110,14 @@ namespace connectivity
//--------------------------------------------------------------------
void SharedResources_Impl::registerClient()
{
- osl_incrementInterlockedCount( &s_nClients );
+ osl_atomic_increment( &s_nClients );
}
//--------------------------------------------------------------------
void SharedResources_Impl::revokeClient()
{
::osl::MutexGuard aGuard( getMutex() );
- if ( 0 == osl_decrementInterlockedCount( &s_nClients ) )
+ if ( 0 == osl_atomic_decrement( &s_nClients ) )
{
delete s_pInstance;
s_pInstance = NULL;
diff --git a/connectivity/source/simpledbt/refbase.cxx b/connectivity/source/simpledbt/refbase.cxx
index 9af0ada8f2f7..7c9fe5e6b550 100644
--- a/connectivity/source/simpledbt/refbase.cxx
+++ b/connectivity/source/simpledbt/refbase.cxx
@@ -35,13 +35,13 @@ namespace connectivity
//----------------------------------------------------------------
oslInterlockedCount SAL_CALL ORefBase::acquire()
{
- return osl_incrementInterlockedCount(&m_refCount);
+ return osl_atomic_increment(&m_refCount);
}
//----------------------------------------------------------------
oslInterlockedCount SAL_CALL ORefBase::release()
{
- oslInterlockedCount nNewRefCount = osl_decrementInterlockedCount(&m_refCount);
+ oslInterlockedCount nNewRefCount = osl_atomic_decrement(&m_refCount);
if (0 == nNewRefCount)
delete this;