diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-09-16 02:00:14 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-09-17 14:26:12 +0000 |
commit | 195f17ee40003f0ff74d08fecf5d68afe9cb1036 (patch) | |
tree | beca88d96ae704d4ecb03defd9390b1a05a24c47 /sal | |
parent | Help compilers with explicit template argument. (diff) | |
download | core-195f17ee40003f0ff74d08fecf5d68afe9cb1036.tar.gz core-195f17ee40003f0ff74d08fecf5d68afe9cb1036.zip |
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 'sal')
-rw-r--r-- | sal/rtl/source/strtmpl.cxx | 4 | ||||
-rw-r--r-- | sal/rtl/source/ustring.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sal/rtl/source/strtmpl.cxx b/sal/rtl/source/strtmpl.cxx index a6cfa18a2410..ebb0da199f2c 100644 --- a/sal/rtl/source/strtmpl.cxx +++ b/sal/rtl/source/strtmpl.cxx @@ -1026,7 +1026,7 @@ static IMPL_RTL_STRCODE* IMPL_RTL_STRINGNAME( ImplNewCopy )( IMPL_RTL_STRINGDATA #define IMPL_RTL_AQUIRE( pThis ) \ { \ if (!SAL_STRING_IS_STATIC (pThis)) \ - osl_incrementInterlockedCount( &((pThis)->refCount) ); \ + osl_atomic_increment( &((pThis)->refCount) ); \ } /* ----------------------------------------------------------------------- */ @@ -1055,7 +1055,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( release )( IMPL_RTL_STRINGDATA* pThis ) #endif if ( pThis->refCount == 1 || - !osl_decrementInterlockedCount( &(pThis->refCount) ) ) + !osl_atomic_decrement( &(pThis->refCount) ) ) { RTL_LOG_STRING_DELETE( pThis ); rtl_freeMemory( pThis ); diff --git a/sal/rtl/source/ustring.cxx b/sal/rtl/source/ustring.cxx index 23ec82b28f68..ec0827f4e561 100644 --- a/sal/rtl/source/ustring.cxx +++ b/sal/rtl/source/ustring.cxx @@ -951,7 +951,7 @@ internRelease (rtl_uString *pThis) rtl_uString *pFree = NULL; if ( SAL_STRING_REFCOUNT( - osl_decrementInterlockedCount( &(pThis->refCount) ) ) == 0) + osl_atomic_decrement( &(pThis->refCount) ) ) == 0) { pPoolMutex = getInternMutex(); osl_acquireMutex( pPoolMutex ); @@ -960,7 +960,7 @@ internRelease (rtl_uString *pThis) /* May have been separately acquired */ if ( SAL_STRING_REFCOUNT( - osl_incrementInterlockedCount( &(pThis->refCount) ) ) == 1 ) + osl_atomic_increment( &(pThis->refCount) ) ) == 1 ) { /* we got the last ref */ pFree = pThis; |