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 --- testtools/source/performance/pseudo.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'testtools/source/performance/pseudo.cxx') diff --git a/testtools/source/performance/pseudo.cxx b/testtools/source/performance/pseudo.cxx index c97f6b4b9aa2..cb41a7ca0a09 100644 --- a/testtools/source/performance/pseudo.cxx +++ b/testtools/source/performance/pseudo.cxx @@ -102,7 +102,7 @@ static void SAL_CALL pseudo_unoInterfaceProxy_free( uno_ExtEnvironment * pEnv, v //-------------------------------------------------------------------------------------------------- static void SAL_CALL pseudo_unoInterfaceProxy_acquire( uno_Interface * pUnoI ) { - if (1 == osl_incrementInterlockedCount( &static_cast< pseudo_unoInterfaceProxy * >( pUnoI )->nRef )) + if (1 == osl_atomic_increment( &static_cast< pseudo_unoInterfaceProxy * >( pUnoI )->nRef )) { // rebirth of proxy zombie // register at uno env @@ -118,7 +118,7 @@ static void SAL_CALL pseudo_unoInterfaceProxy_acquire( uno_Interface * pUnoI ) //-------------------------------------------------------------------------------------------------- static void SAL_CALL pseudo_unoInterfaceProxy_release( uno_Interface * pUnoI ) { - if (! osl_decrementInterlockedCount( & static_cast< pseudo_unoInterfaceProxy * >( pUnoI )->nRef )) + if (! osl_atomic_decrement( & static_cast< pseudo_unoInterfaceProxy * >( pUnoI )->nRef )) { // revoke from uno env on last release (*static_cast< pseudo_unoInterfaceProxy * >( pUnoI )->pPseudoMapping->pTo->revokeInterface)( @@ -198,7 +198,7 @@ static void SAL_CALL pseudo_Mapping_free( uno_Mapping * pMapping ) //-------------------------------------------------------------------------------------------------- static void SAL_CALL pseudo_Mapping_acquire( uno_Mapping * pMapping ) { - if (1 == osl_incrementInterlockedCount( & static_cast< pseudo_Mapping * >( pMapping )->nRef )) + if (1 == osl_atomic_increment( & static_cast< pseudo_Mapping * >( pMapping )->nRef )) { OUString aMappingPurpose( RTL_CONSTASCII_USTRINGPARAM("pseudo") ); uno_registerMapping( &pMapping, @@ -211,7 +211,7 @@ static void SAL_CALL pseudo_Mapping_acquire( uno_Mapping * pMapping ) //-------------------------------------------------------------------------------------------------- static void SAL_CALL pseudo_Mapping_release( uno_Mapping * pMapping ) { - if (! osl_decrementInterlockedCount( & static_cast< pseudo_Mapping * >( pMapping )->nRef )) + if (! osl_atomic_decrement( & static_cast< pseudo_Mapping * >( pMapping )->nRef )) { uno_revokeMapping( pMapping ); } -- cgit v1.2.3