diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-09-22 01:51:12 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-09-25 01:55:38 +0000 |
commit | 750fc206113a796035cbc05fb904fbae0eb771a8 (patch) | |
tree | 4ea1f0378c2b6d7f50480d3b9051de91780219cd /bridges/source | |
parent | bcd2b017088822ea95e9d33d1d0dc360c0ec8d74 (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 'bridges/source')
-rw-r--r-- | bridges/source/cpp_uno/shared/bridge.cxx | 4 | ||||
-rw-r--r-- | bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx | 4 | ||||
-rw-r--r-- | bridges/source/cpp_uno/shared/unointerfaceproxy.cxx | 4 | ||||
-rw-r--r-- | bridges/source/jni_uno/jni_bridge.cxx | 4 | ||||
-rw-r--r-- | bridges/source/jni_uno/jni_uno2java.cxx | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/bridges/source/cpp_uno/shared/bridge.cxx b/bridges/source/cpp_uno/shared/bridge.cxx index 4523f20061a3..cefb62ef3453 100644 --- a/bridges/source/cpp_uno/shared/bridge.cxx +++ b/bridges/source/cpp_uno/shared/bridge.cxx @@ -153,7 +153,7 @@ uno_Mapping * Bridge::createMapping( void Bridge::acquire() SAL_THROW(()) { - if (1 == osl_incrementInterlockedCount( &nRef )) + if (1 == osl_atomic_increment( &nRef )) { if (bExportCpp2Uno) { @@ -174,7 +174,7 @@ void Bridge::acquire() SAL_THROW(()) void Bridge::release() SAL_THROW(()) { - if (! osl_decrementInterlockedCount( &nRef )) + if (! osl_atomic_decrement( &nRef )) { ::uno_revokeMapping( bExportCpp2Uno ? &aCpp2Uno : &aUno2Cpp ); } diff --git a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx index 36942481fefc..cc8c4d947e8f 100644 --- a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx +++ b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx @@ -129,7 +129,7 @@ com::sun::star::uno::XInterface * CppInterfaceProxy::create( void CppInterfaceProxy::acquireProxy() SAL_THROW(()) { - if (1 == osl_incrementInterlockedCount( &nRef )) + if (1 == osl_atomic_increment( &nRef )) { // rebirth of proxy zombie // register at cpp env @@ -143,7 +143,7 @@ void CppInterfaceProxy::acquireProxy() SAL_THROW(()) void CppInterfaceProxy::releaseProxy() SAL_THROW(()) { - if (! osl_decrementInterlockedCount( &nRef )) // last release + if (! osl_atomic_decrement( &nRef )) // last release { // revoke from cpp env (*pBridge->getCppEnv()->revokeInterface)( diff --git a/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx b/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx index 247b31454e4d..81353cff7682 100644 --- a/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx +++ b/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx @@ -54,7 +54,7 @@ void freeUnoInterfaceProxy(uno_ExtEnvironment * pEnv, void * pProxy) void acquireProxy(uno_Interface * pUnoI) { - if (1 == osl_incrementInterlockedCount( + if (1 == osl_atomic_increment( & static_cast< UnoInterfaceProxy * >( pUnoI )->nRef )) { // rebirth of proxy zombie @@ -76,7 +76,7 @@ void acquireProxy(uno_Interface * pUnoI) void releaseProxy(uno_Interface * pUnoI) { - if (! osl_decrementInterlockedCount( + if (! osl_atomic_decrement( & static_cast< UnoInterfaceProxy * >( pUnoI )->nRef )) { // revoke from uno env on last release diff --git a/bridges/source/jni_uno/jni_bridge.cxx b/bridges/source/jni_uno/jni_bridge.cxx index be46d1de64fd..51ab45939738 100644 --- a/bridges/source/jni_uno/jni_bridge.cxx +++ b/bridges/source/jni_uno/jni_bridge.cxx @@ -214,7 +214,7 @@ namespace jni_uno //______________________________________________________________________________ void Bridge::acquire() const SAL_THROW(()) { - if (1 == osl_incrementInterlockedCount( &m_ref )) + if (1 == osl_atomic_increment( &m_ref )) { if (m_registered_java2uno) { @@ -236,7 +236,7 @@ void Bridge::acquire() const SAL_THROW(()) //______________________________________________________________________________ void Bridge::release() const SAL_THROW(()) { - if (! osl_decrementInterlockedCount( &m_ref )) + if (! osl_atomic_decrement( &m_ref )) { uno_revokeMapping( m_registered_java2uno diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx index b38aad90391f..a7ae60cb02a7 100644 --- a/bridges/source/jni_uno/jni_uno2java.cxx +++ b/bridges/source/jni_uno/jni_uno2java.cxx @@ -479,7 +479,7 @@ inline UNO_proxy::UNO_proxy( //______________________________________________________________________________ inline void UNO_proxy::acquire() const { - if (1 == osl_incrementInterlockedCount( &m_ref )) + if (1 == osl_atomic_increment( &m_ref )) { // rebirth of proxy zombie void * that = const_cast< UNO_proxy * >( this ); @@ -497,7 +497,7 @@ inline void UNO_proxy::acquire() const //______________________________________________________________________________ inline void UNO_proxy::release() const { - if (0 == osl_decrementInterlockedCount( &m_ref )) + if (0 == osl_atomic_decrement( &m_ref )) { // revoke from uno env on last release (*m_bridge->m_uno_env->revokeInterface)( |