summaryrefslogtreecommitdiff
path: root/cppuhelper/source/implbase.cxx
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-09-16 02:00:14 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-09-17 14:26:12 +0000
commit195f17ee40003f0ff74d08fecf5d68afe9cb1036 (patch)
treebeca88d96ae704d4ecb03defd9390b1a05a24c47 /cppuhelper/source/implbase.cxx
parentc9d3373dadc1fbb36a6cf62661f0ec59b313d74b (diff)
migrate some of the biggest consumer of osl_*InterlockedCount to osl_atomic
Change-Id: I0e6992afbeffaf3b993e6630fb396d93012890e0 Reviewed-on: https://gerrit.libreoffice.org/632 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'cppuhelper/source/implbase.cxx')
-rw-r--r--cppuhelper/source/implbase.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx
index fbe7ed69b79c..60e6facaca1b 100644
--- a/cppuhelper/source/implbase.cxx
+++ b/cppuhelper/source/implbase.cxx
@@ -238,11 +238,11 @@ void WeakComponentImplHelperBase::acquire()
void WeakComponentImplHelperBase::release()
throw ()
{
- if (osl_decrementInterlockedCount( &m_refCount ) == 0) {
+ if (osl_atomic_decrement( &m_refCount ) == 0) {
// ensure no other references are created, via the weak connection point, from now on
disposeWeakConnectionPoint();
// restore reference count:
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
if (! rBHelper.bDisposed) {
try {
dispose();
@@ -374,11 +374,11 @@ void WeakAggComponentImplHelperBase::release()
if (xDelegator_.is()) {
OWeakAggObject::release();
}
- else if (osl_decrementInterlockedCount( &m_refCount ) == 0) {
+ else if (osl_atomic_decrement( &m_refCount ) == 0) {
// ensure no other references are created, via the weak connection point, from now on
disposeWeakConnectionPoint();
// restore reference count:
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
if (! rBHelper.bDisposed) {
try {
dispose();