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>
This commit is contained in:
Norbert Thiebaud
2012-09-16 02:00:14 -05:00
parent c9d3373dad
commit 195f17ee40
24 changed files with 98 additions and 109 deletions

View File

@@ -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();