summaryrefslogtreecommitdiff
path: root/svtools
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 /svtools
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 'svtools')
-rw-r--r--svtools/source/contnr/svimpbox.cxx4
-rw-r--r--svtools/source/java/javacontext.cxx4
-rw-r--r--svtools/source/java/javainteractionhandler.cxx4
-rw-r--r--svtools/source/misc/svtaccessiblefactory.cxx8
-rw-r--r--svtools/source/misc/transfer.cxx4
-rw-r--r--svtools/source/table/mousefunction.cxx4
-rw-r--r--svtools/source/toolpanel/refbase.cxx4
7 files changed, 16 insertions, 16 deletions
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index d828661e2959..6149811e00c5 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -63,7 +63,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits n
bAreChildrenTransient( sal_True ),
m_pStringSorter(NULL)
{
- osl_incrementInterlockedCount(&s_nImageRefCount);
+ osl_atomic_increment(&s_nImageRefCount);
pView = pLBView;
pTree = pLBTree;
aSelEng.SetFunctionSet( (FunctionSet*)&aFctSet );
@@ -124,7 +124,7 @@ SvImpLBox::~SvImpLBox()
StopUserEvent();
delete m_pStringSorter;
- if ( osl_decrementInterlockedCount(&s_nImageRefCount) == 0 )
+ if ( osl_atomic_decrement(&s_nImageRefCount) == 0 )
{
DELETEZ(s_pDefCollapsed);
DELETEZ(s_pDefExpanded);
diff --git a/svtools/source/java/javacontext.cxx b/svtools/source/java/javacontext.cxx
index 54ebcc2a4826..43155e4adebc 100644
--- a/svtools/source/java/javacontext.cxx
+++ b/svtools/source/java/javacontext.cxx
@@ -61,12 +61,12 @@ Any SAL_CALL JavaContext::queryInterface(const Type& aType )
void SAL_CALL JavaContext::acquire( ) throw ()
{
- osl_incrementInterlockedCount( &m_aRefCount );
+ osl_atomic_increment( &m_aRefCount );
}
void SAL_CALL JavaContext::release( ) throw ()
{
- if (! osl_decrementInterlockedCount( &m_aRefCount ))
+ if (! osl_atomic_decrement( &m_aRefCount ))
delete this;
}
diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx
index 16146ba34e56..40c21a4b96b8 100644
--- a/svtools/source/java/javainteractionhandler.cxx
+++ b/svtools/source/java/javainteractionhandler.cxx
@@ -81,12 +81,12 @@ Any SAL_CALL JavaInteractionHandler::queryInterface(const Type& aType )
void SAL_CALL JavaInteractionHandler::acquire( ) throw ()
{
- osl_incrementInterlockedCount( &m_aRefCount );
+ osl_atomic_increment( &m_aRefCount );
}
void SAL_CALL JavaInteractionHandler::release( ) throw ()
{
- if (! osl_decrementInterlockedCount( &m_aRefCount ))
+ if (! osl_atomic_decrement( &m_aRefCount ))
delete this;
}
diff --git a/svtools/source/misc/svtaccessiblefactory.cxx b/svtools/source/misc/svtaccessiblefactory.cxx
index dcda126304ab..f08fb7db1aac 100644
--- a/svtools/source/misc/svtaccessiblefactory.cxx
+++ b/svtools/source/misc/svtaccessiblefactory.cxx
@@ -240,13 +240,13 @@ namespace svt
//----------------------------------------------------------------
oslInterlockedCount SAL_CALL AccessibleDummyFactory::acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
//----------------------------------------------------------------
oslInterlockedCount SAL_CALL AccessibleDummyFactory::release()
{
- if ( 0 == osl_decrementInterlockedCount( &m_refCount ) )
+ if ( 0 == osl_atomic_decrement( &m_refCount ) )
{
delete this;
return 0;
@@ -275,7 +275,7 @@ namespace svt
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
#ifdef UNLOAD_ON_LAST_CLIENT_DYING
- if ( 1 == osl_incrementInterlockedCount( &s_nAccessibleFactoryAccesss ) )
+ if ( 1 == osl_atomic_increment( &s_nAccessibleFactoryAccesss ) )
{ // the first client
#endif // UNLOAD_ON_LAST_CLIENT_DYING
// load the library implementing the factory
@@ -323,7 +323,7 @@ namespace svt
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
#ifdef UNLOAD_ON_LAST_CLIENT_DYING
- if( 0 == osl_decrementInterlockedCount( &s_nAccessibleFactoryAccesss ) )
+ if( 0 == osl_atomic_decrement( &s_nAccessibleFactoryAccesss ) )
{
s_pFactory = NULL;
s_pAccessibleFactoryFunc = NULL;
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 0a80eb8ea5e8..79a6412caf6d 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -1240,7 +1240,7 @@ TransferableClipboardNotifier::TransferableClipboardNotifier( const Reference< X
,mxNotifier( _rxClipboard, UNO_QUERY )
,mpListener( &_rListener )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
if ( mxNotifier.is() )
mxNotifier->addClipboardListener( this );
@@ -1248,7 +1248,7 @@ TransferableClipboardNotifier::TransferableClipboardNotifier( const Reference< X
// born dead
mpListener = NULL;
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx
index 8e400a52e0dc..e1671bf858b7 100644
--- a/svtools/source/table/mousefunction.cxx
+++ b/svtools/source/table/mousefunction.cxx
@@ -43,13 +43,13 @@ namespace svt { namespace table
//------------------------------------------------------------------------------------------------------------------
oslInterlockedCount MouseFunction::acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
//------------------------------------------------------------------------------------------------------------------
oslInterlockedCount MouseFunction::release()
{
- oslInterlockedCount newCount = osl_decrementInterlockedCount( &m_refCount );
+ oslInterlockedCount newCount = osl_atomic_decrement( &m_refCount );
if ( newCount == 0 )
{
delete this;
diff --git a/svtools/source/toolpanel/refbase.cxx b/svtools/source/toolpanel/refbase.cxx
index 54f926cf6e36..92a85224d0a9 100644
--- a/svtools/source/toolpanel/refbase.cxx
+++ b/svtools/source/toolpanel/refbase.cxx
@@ -31,13 +31,13 @@ namespace svt
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL RefBase::acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL RefBase::release()
{
- oslInterlockedCount newCount = osl_decrementInterlockedCount( &m_refCount );
+ oslInterlockedCount newCount = osl_atomic_decrement( &m_refCount );
if ( 0 == newCount )
delete this;
return newCount;