summaryrefslogtreecommitdiff
path: root/testtools
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 /testtools
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 'testtools')
-rw-r--r--testtools/source/performance/pseudo.cxx8
-rw-r--r--testtools/source/performance/ubobject.cxx4
2 files changed, 6 insertions, 6 deletions
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 );
}
diff --git a/testtools/source/performance/ubobject.cxx b/testtools/source/performance/ubobject.cxx
index 23c165c9a1a3..67d67ba950aa 100644
--- a/testtools/source/performance/ubobject.cxx
+++ b/testtools/source/performance/ubobject.cxx
@@ -104,9 +104,9 @@ public:
return aRet;
}
virtual void SAL_CALL acquire() throw()
- { osl_incrementInterlockedCount( &_nRef ); }
+ { osl_atomic_increment( &_nRef ); }
virtual void SAL_CALL release() throw()
- { if (! osl_decrementInterlockedCount( &_nRef )) delete this; }
+ { if (! osl_atomic_decrement( &_nRef )) delete this; }
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw (RuntimeException);