summaryrefslogtreecommitdiffstats
path: root/svtools/source/misc
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 /svtools/source/misc
parentBuild fix. (diff)
downloadcore-750fc206113a796035cbc05fb904fbae0eb771a8.tar.gz
core-750fc206113a796035cbc05fb904fbae0eb771a8.zip
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 'svtools/source/misc')
-rw-r--r--svtools/source/misc/svtaccessiblefactory.cxx8
-rw-r--r--svtools/source/misc/transfer.cxx4
2 files changed, 6 insertions, 6 deletions
diff --git a/svtools/source/misc/svtaccessiblefactory.cxx b/svtools/source/misc/svtaccessiblefactory.cxx
index dcda126304ab..f08fb7db1aac 100644
--- a/svtools/source/misc/svtaccessiblefactory.cxx
+++ b/svtools/source/misc/svtaccessiblefactory.cxx
@@ -240,13 +240,13 @@ namespace svt
//----------------------------------------------------------------
oslInterlockedCount SAL_CALL AccessibleDummyFactory::acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
//----------------------------------------------------------------
oslInterlockedCount SAL_CALL AccessibleDummyFactory::release()
{
- if ( 0 == osl_decrementInterlockedCount( &m_refCount ) )
+ if ( 0 == osl_atomic_decrement( &m_refCount ) )
{
delete this;
return 0;
@@ -275,7 +275,7 @@ namespace svt
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
#ifdef UNLOAD_ON_LAST_CLIENT_DYING
- if ( 1 == osl_incrementInterlockedCount( &s_nAccessibleFactoryAccesss ) )
+ if ( 1 == osl_atomic_increment( &s_nAccessibleFactoryAccesss ) )
{ // the first client
#endif // UNLOAD_ON_LAST_CLIENT_DYING
// load the library implementing the factory
@@ -323,7 +323,7 @@ namespace svt
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
#ifdef UNLOAD_ON_LAST_CLIENT_DYING
- if( 0 == osl_decrementInterlockedCount( &s_nAccessibleFactoryAccesss ) )
+ if( 0 == osl_atomic_decrement( &s_nAccessibleFactoryAccesss ) )
{
s_pFactory = NULL;
s_pAccessibleFactoryFunc = NULL;
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 0a80eb8ea5e8..79a6412caf6d 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -1240,7 +1240,7 @@ TransferableClipboardNotifier::TransferableClipboardNotifier( const Reference< X
,mxNotifier( _rxClipboard, UNO_QUERY )
,mpListener( &_rListener )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
if ( mxNotifier.is() )
mxNotifier->addClipboardListener( this );
@@ -1248,7 +1248,7 @@ TransferableClipboardNotifier::TransferableClipboardNotifier( const Reference< X
// born dead
mpListener = NULL;
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------