summaryrefslogtreecommitdiff
path: root/sw
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 /sw
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 'sw')
-rw-r--r--sw/source/core/doc/doc.cxx4
-rw-r--r--sw/source/core/docnode/observablethread.cxx4
-rw-r--r--sw/source/core/inc/threadmanager.hxx2
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx4
4 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index de69e8835c38..af8717ea0421 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -146,13 +146,13 @@ using ::rtl::OUString;
sal_Int32 SwDoc::acquire()
{
OSL_ENSURE(mReferenceCount >= 0, "Negative reference count detected! This is a sign for unbalanced acquire/release calls.");
- return osl_incrementInterlockedCount(&mReferenceCount);
+ return osl_atomic_increment(&mReferenceCount);
}
sal_Int32 SwDoc::release()
{
OSL_PRECOND(mReferenceCount >= 1, "Object is already released! Releasing it again leads to a negative reference count.");
- return osl_decrementInterlockedCount(&mReferenceCount);
+ return osl_atomic_decrement(&mReferenceCount);
}
sal_Int32 SwDoc::getReferenceCount() const
diff --git a/sw/source/core/docnode/observablethread.cxx b/sw/source/core/docnode/observablethread.cxx
index bafe09c10a41..cf49195d86ff 100644
--- a/sw/source/core/docnode/observablethread.cxx
+++ b/sw/source/core/docnode/observablethread.cxx
@@ -48,12 +48,12 @@ ObservableThread::~ObservableThread()
oslInterlockedCount ObservableThread::acquire()
{
- return osl_incrementInterlockedCount( &mnRefCount );
+ return osl_atomic_increment( &mnRefCount );
}
oslInterlockedCount ObservableThread::release()
{
- oslInterlockedCount nCount( osl_decrementInterlockedCount( &mnRefCount ) );
+ oslInterlockedCount nCount( osl_atomic_decrement( &mnRefCount ) );
if ( nCount == 0 )
delete this;
return nCount;
diff --git a/sw/source/core/inc/threadmanager.hxx b/sw/source/core/inc/threadmanager.hxx
index 6f341d1ebdff..26542323f0c5 100644
--- a/sw/source/core/inc/threadmanager.hxx
+++ b/sw/source/core/inc/threadmanager.hxx
@@ -162,7 +162,7 @@ class ThreadManager : public IThreadListenerOwner
inline oslInterlockedCount RetrieveNewThreadID()
{
- return osl_incrementInterlockedCount( &mnThreadIDCounter );
+ return osl_atomic_increment( &mnThreadIDCounter );
}
bool StartWaitingThread();
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index ba871a79fe7f..c411a6e2b95c 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -244,7 +244,7 @@ namespace
,m_sTemporaryFile( _rTemporaryFile )
,m_nPendingDeleteAttempts( 0 )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
try
{
if ( m_xDocument.is() )
@@ -261,7 +261,7 @@ namespace
{
OSL_FAIL("DelayedFileDeletion::DelayedFileDeletion: could not register as event listener at the model!" );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------