summaryrefslogtreecommitdiff
path: root/sal/osl
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-09-22 01:51:12 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-09-25 01:55:38 +0000
commit750fc206113a796035cbc05fb904fbae0eb771a8 (patch)
tree4ea1f0378c2b6d7f50480d3b9051de91780219cd /sal/osl
parentbcd2b017088822ea95e9d33d1d0dc360c0ec8d74 (diff)
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/osl')
-rw-r--r--sal/osl/all/debugbase.cxx4
-rw-r--r--sal/osl/unx/pipe.c4
-rw-r--r--sal/osl/unx/socket.c4
-rw-r--r--sal/osl/w32/pipe.c8
-rw-r--r--sal/osl/w32/socket.cxx4
-rw-r--r--sal/osl/w32/thread.c2
6 files changed, 13 insertions, 13 deletions
diff --git a/sal/osl/all/debugbase.cxx b/sal/osl/all/debugbase.cxx
index 6648d53bf4e2..3b468fa821c0 100644
--- a/sal/osl/all/debugbase.cxx
+++ b/sal/osl/all/debugbase.cxx
@@ -155,7 +155,7 @@ void SAL_CALL osl_detail_ObjectRegistry_registerObject(
static_cast<void>(insertion);
}
else {
- osl_incrementInterlockedCount(&rData.m_nCount);
+ osl_atomic_increment(&rData.m_nCount);
}
}
@@ -170,7 +170,7 @@ void SAL_CALL osl_detail_ObjectRegistry_revokeObject(
static_cast<void>(n);
}
else {
- osl_decrementInterlockedCount(&rData.m_nCount);
+ osl_atomic_decrement(&rData.m_nCount);
}
}
diff --git a/sal/osl/unx/pipe.c b/sal/osl/unx/pipe.c
index 518559058f27..2758ece8ca03 100644
--- a/sal/osl/unx/pipe.c
+++ b/sal/osl/unx/pipe.c
@@ -354,7 +354,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
void SAL_CALL osl_acquirePipe( oslPipe pPipe )
{
- osl_incrementInterlockedCount( &(pPipe->m_nRefCount) );
+ osl_atomic_increment( &(pPipe->m_nRefCount) );
}
void SAL_CALL osl_releasePipe( oslPipe pPipe )
@@ -363,7 +363,7 @@ void SAL_CALL osl_releasePipe( oslPipe pPipe )
if( 0 == pPipe )
return;
- if( 0 == osl_decrementInterlockedCount( &(pPipe->m_nRefCount) ) )
+ if( 0 == osl_atomic_decrement( &(pPipe->m_nRefCount) ) )
{
if( ! pPipe->m_bClosed )
osl_closePipe( pPipe );
diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index d47146323df1..6d5e448082f7 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -1488,12 +1488,12 @@ oslSocket SAL_CALL osl_createSocket(oslAddrFamily Family,
void SAL_CALL osl_acquireSocket(oslSocket pSocket)
{
- osl_incrementInterlockedCount( &(pSocket->m_nRefCount ) );
+ osl_atomic_increment( &(pSocket->m_nRefCount ) );
}
void SAL_CALL osl_releaseSocket( oslSocket pSocket )
{
- if( pSocket && 0 == osl_decrementInterlockedCount( &(pSocket->m_nRefCount) ) )
+ if( pSocket && 0 == osl_atomic_decrement( &(pSocket->m_nRefCount) ) )
{
#if defined(LINUX)
if ( pSocket->m_bIsAccepting == sal_True )
diff --git a/sal/osl/w32/pipe.c b/sal/osl/w32/pipe.c
index e02692362028..3a9f11026e76 100644
--- a/sal/osl/w32/pipe.c
+++ b/sal/osl/w32/pipe.c
@@ -175,7 +175,7 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *strPipeName, oslPipeOptions Options
/* alloc memory */
pPipe= __osl_createPipeImpl();
- osl_incrementInterlockedCount(&(pPipe->m_Reference));
+ osl_atomic_increment(&(pPipe->m_Reference));
/* build system pipe name */
rtl_uString_assign(&temp, path);
@@ -266,7 +266,7 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *strPipeName, oslPipeOptions Options
void SAL_CALL osl_acquirePipe( oslPipe pPipe )
{
- osl_incrementInterlockedCount( &(pPipe->m_Reference) );
+ osl_atomic_increment( &(pPipe->m_Reference) );
}
void SAL_CALL osl_releasePipe( oslPipe pPipe )
@@ -276,7 +276,7 @@ void SAL_CALL osl_releasePipe( oslPipe pPipe )
if( 0 == pPipe )
return;
- if( 0 == osl_decrementInterlockedCount( &(pPipe->m_Reference) ) )
+ if( 0 == osl_atomic_decrement( &(pPipe->m_Reference) ) )
{
if( ! pPipe->m_bClosed )
osl_closePipe( pPipe );
@@ -357,7 +357,7 @@ oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe)
pAcceptedPipe = __osl_createPipeImpl();
OSL_ASSERT(pAcceptedPipe);
- osl_incrementInterlockedCount(&(pAcceptedPipe->m_Reference));
+ osl_atomic_increment(&(pAcceptedPipe->m_Reference));
rtl_uString_assign(&pAcceptedPipe->m_Name, pPipe->m_Name);
pAcceptedPipe->m_File = pPipe->m_File;
diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx
index 4f150d0e6486..42a0e37a8212 100644
--- a/sal/osl/w32/socket.cxx
+++ b/sal/osl/w32/socket.cxx
@@ -1144,12 +1144,12 @@ oslSocket SAL_CALL osl_createSocket (
void SAL_CALL osl_acquireSocket( oslSocket pSocket )
{
- osl_incrementInterlockedCount( &(pSocket->m_nRefCount) );
+ osl_atomic_increment( &(pSocket->m_nRefCount) );
}
void SAL_CALL osl_releaseSocket( oslSocket pSocket )
{
- if( pSocket && 0 == osl_decrementInterlockedCount( &(pSocket->m_nRefCount) ) )
+ if( pSocket && 0 == osl_atomic_decrement( &(pSocket->m_nRefCount) ) )
{
osl_closeSocket( pSocket );
__osl_destroySocketImpl( pSocket );
diff --git a/sal/osl/w32/thread.c b/sal/osl/w32/thread.c
index 78260d66ae42..5281ace5a2f8 100644
--- a/sal/osl/w32/thread.c
+++ b/sal/osl/w32/thread.c
@@ -355,7 +355,7 @@ void SAL_CALL osl_terminateThread(oslThread Thread)
return;
}
- osl_incrementInterlockedCount(&(pThreadImpl->m_nTerminationRequested));
+ osl_atomic_increment(&(pThreadImpl->m_nTerminationRequested));
}