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 /sal/rtl | |
parent | Build fix. (diff) | |
download | core-750fc206113a796035cbc05fb904fbae0eb771a8.tar.gz core-750fc206113a796035cbc05fb904fbae0eb771a8.zip |
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 'sal/rtl')
-rw-r--r-- | sal/rtl/source/byteseq.cxx | 8 | ||||
-rw-r--r-- | sal/rtl/source/unload.cxx | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sal/rtl/source/byteseq.cxx b/sal/rtl/source/byteseq.cxx index 432483c1e3f5..ee745818f0a8 100644 --- a/sal/rtl/source/byteseq.cxx +++ b/sal/rtl/source/byteseq.cxx @@ -65,7 +65,7 @@ void SAL_CALL rtl_byte_sequence_reference2One( if ( pNew != 0 ) memcpy( pNew->elements, pSequence->elements, nElements ); - if (! osl_decrementInterlockedCount( &pSequence->nRefCount )) + if (! osl_atomic_decrement( &pSequence->nRefCount )) rtl_freeMemory( pSequence ); } else @@ -114,7 +114,7 @@ void SAL_CALL rtl_byte_sequence_realloc( } } - if (! osl_decrementInterlockedCount( &pSequence->nRefCount )) + if (! osl_atomic_decrement( &pSequence->nRefCount )) rtl_freeMemory( pSequence ); pSequence = pNew; } @@ -138,7 +138,7 @@ void SAL_CALL rtl_byte_sequence_acquire( sal_Sequence *pSequence ) SAL_THROW_EXTERN_C() { OSL_ASSERT( pSequence ); - osl_incrementInterlockedCount( &(pSequence->nRefCount) ); + osl_atomic_increment( &(pSequence->nRefCount) ); } //================================================================================================== @@ -147,7 +147,7 @@ void SAL_CALL rtl_byte_sequence_release( sal_Sequence *pSequence ) { if ( pSequence != 0 ) { - if (! osl_decrementInterlockedCount( &(pSequence->nRefCount )) ) + if (! osl_atomic_decrement( &(pSequence->nRefCount )) ) { rtl_freeMemory( pSequence ); } diff --git a/sal/rtl/source/unload.cxx b/sal/rtl/source/unload.cxx index 5e9cdf1e0482..beb9e11f25fd 100644 --- a/sal/rtl/source/unload.cxx +++ b/sal/rtl/source/unload.cxx @@ -130,7 +130,7 @@ extern "C" void rtl_moduleCount_acquire(rtl_ModuleCount * that ) (void) that; #else rtl_StandardModuleCount* pMod= (rtl_StandardModuleCount*)that; - osl_incrementInterlockedCount( &pMod->counter); + osl_atomic_increment( &pMod->counter); #endif } @@ -141,7 +141,7 @@ extern "C" void rtl_moduleCount_release( rtl_ModuleCount * that ) #else rtl_StandardModuleCount* pMod= (rtl_StandardModuleCount*)that; OSL_ENSURE( pMod->counter >0 , "library counter incorrect" ); - osl_decrementInterlockedCount( &pMod->counter); + osl_atomic_decrement( &pMod->counter); if( pMod->counter == 0) { MutexGuard guard( getUnloadingMutex()); |