From 750fc206113a796035cbc05fb904fbae0eb771a8 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Sat, 22 Sep 2012 01:51:12 -0500 Subject: replace remaining InterlockedCount() with inlined version Change-Id: Ifcfa48fc87f905a91470a5b0fd597b02f220784c Reviewed-on: https://gerrit.libreoffice.org/671 Tested-by: Norbert Thiebaud Reviewed-by: Norbert Thiebaud --- svtools/source/misc/svtaccessiblefactory.cxx | 8 ++++---- svtools/source/misc/transfer.cxx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'svtools/source/misc') 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 ); } // ----------------------------------------------------------------------------- -- cgit