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

@@ -720,7 +720,7 @@ static inline bool ireallocSequence(
if (ret)
{
// destruct sequence
if (osl_decrementInterlockedCount( &pSeq->nRefCount ) == 0)
if (osl_atomic_decrement( &pSeq->nRefCount ) == 0)
{
if (nElements > 0)
{
@@ -926,7 +926,7 @@ sal_Bool SAL_CALL uno_type_sequence_reference2One(
if (ret)
{
// easy destruction of empty sequence:
if (osl_decrementInterlockedCount( &pSequence->nRefCount ) == 0)
if (osl_atomic_decrement( &pSequence->nRefCount ) == 0)
rtl_freeMemory( pSequence );
*ppSequence = pNew;
}
@@ -969,7 +969,7 @@ sal_Bool SAL_CALL uno_sequence_reference2One(
if (ret)
{
// easy destruction of empty sequence:
if (osl_decrementInterlockedCount( &pSequence->nRefCount ) == 0)
if (osl_atomic_decrement( &pSequence->nRefCount ) == 0)
rtl_freeMemory( pSequence );
*ppSequence = pNew;
}
@@ -989,7 +989,7 @@ void SAL_CALL uno_sequence_assign(
{
if (*ppDest != pSource)
{
::osl_incrementInterlockedCount( &pSource->nRefCount );
osl_atomic_increment( &pSource->nRefCount );
idestructSequence( *ppDest, pTypeDescr->pWeakRef, pTypeDescr, release );
*ppDest = pSource;
}
@@ -1005,7 +1005,7 @@ void SAL_CALL uno_type_sequence_assign(
{
if (*ppDest != pSource)
{
::osl_incrementInterlockedCount( &pSource->nRefCount );
osl_atomic_increment( &pSource->nRefCount );
idestructSequence( *ppDest, pType, 0, release );
*ppDest = pSource;
}