summaryrefslogtreecommitdiff
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
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>
-rw-r--r--accessibility/source/extended/AccessibleBrowseBoxBase.cxx2
-rw-r--r--accessibility/source/extended/AccessibleGridControlBase.cxx2
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrlentry.cxx6
-rw-r--r--accessibility/source/extended/accessiblelistbox.cxx2
-rw-r--r--accessibility/source/extended/accessiblelistboxentry.cxx2
-rw-r--r--accessibility/source/extended/accessibletablistbox.cxx6
-rw-r--r--accessibility/source/extended/accessibletablistboxtable.cxx2
-rw-r--r--accessibility/source/helper/acc_factory.cxx4
-rw-r--r--basctl/source/basicide/doceventnotifier.cxx4
-rw-r--r--basic/source/classes/sbxmod.cxx8
-rw-r--r--basic/source/uno/namecont.cxx4
-rw-r--r--binaryurp/source/proxy.cxx4
-rw-r--r--bridges/inc/bridges/cpp_uno/bridge.hxx12
-rw-r--r--bridges/source/cpp_uno/shared/bridge.cxx4
-rw-r--r--bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx4
-rw-r--r--bridges/source/cpp_uno/shared/unointerfaceproxy.cxx4
-rw-r--r--bridges/source/jni_uno/jni_bridge.cxx4
-rw-r--r--bridges/source/jni_uno/jni_uno2java.cxx4
-rw-r--r--bridges/test/java_uno/acquire/testacquire.cxx4
-rw-r--r--bridges/test/performance/testperformance.cxx2
-rw-r--r--bridges/test/testcomp.cxx4
-rw-r--r--canvas/source/null/null_usagecounter.hxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx8
-rw-r--r--chart2/source/controller/main/ShapeToolbarController.cxx4
-rw-r--r--chart2/source/model/main/Axis.cxx4
-rw-r--r--chart2/source/model/main/ChartModel.cxx8
-rw-r--r--cli_ure/source/uno_bridge/cli_bridge.cxx4
-rw-r--r--cli_ure/source/uno_bridge/cli_proxy.cxx4
-rw-r--r--codemaker/source/codemaker/typemanager.cxx4
-rw-r--r--comphelper/inc/comphelper/uno3.hxx4
-rw-r--r--comphelper/source/misc/SelectionMultiplex.cxx4
-rw-r--r--comphelper/source/misc/accessiblewrapper.cxx4
-rw-r--r--comphelper/source/misc/asyncnotification.cxx4
-rw-r--r--comphelper/source/misc/componentmodule.cxx4
-rw-r--r--comphelper/source/misc/proxyaggregation.cxx8
-rw-r--r--comphelper/source/misc/weakeventlistener.cxx4
-rw-r--r--connectivity/inc/connectivity/CommonTools.hxx4
-rw-r--r--connectivity/source/commontools/ConnectionWrapper.cxx8
-rw-r--r--connectivity/source/commontools/TDatabaseMetaDataBase.cxx4
-rw-r--r--connectivity/source/commontools/TPrivilegesResultSet.cxx4
-rw-r--r--connectivity/source/commontools/dbtools.cxx6
-rw-r--r--connectivity/source/cpool/ZConnectionWrapper.cxx2
-rw-r--r--connectivity/source/cpool/ZDriverWrapper.cxx4
-rw-r--r--connectivity/source/cpool/ZPoolCollection.cxx4
-rw-r--r--connectivity/source/drivers/ado/AConnection.cxx10
-rw-r--r--connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx4
-rw-r--r--connectivity/source/drivers/ado/APreparedStatement.cxx4
-rw-r--r--connectivity/source/drivers/ado/AResultSet.cxx6
-rw-r--r--connectivity/source/drivers/ado/AStatement.cxx4
-rw-r--r--connectivity/source/drivers/calc/CConnection.cxx6
-rw-r--r--connectivity/source/drivers/evoab2/NConnection.cxx4
-rw-r--r--connectivity/source/drivers/file/FConnection.cxx6
-rw-r--r--connectivity/source/drivers/file/FResultSet.cxx6
-rw-r--r--connectivity/source/drivers/file/FStatement.cxx2
-rw-r--r--connectivity/source/drivers/flat/EConnection.cxx4
-rw-r--r--connectivity/source/drivers/hsqldb/HConnection.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/ConnectionLog.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/Object.cxx4
-rw-r--r--connectivity/source/drivers/jdbc/ResultSet.cxx6
-rw-r--r--connectivity/source/drivers/kab/KConnection.cxx4
-rw-r--r--connectivity/source/drivers/kab/KDatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/kab/KDriver.cxx4
-rw-r--r--connectivity/source/drivers/macab/MacabConnection.cxx4
-rw-r--r--connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/macab/MacabDriver.cxx4
-rw-r--r--connectivity/source/drivers/mork/MCatalog.cxx4
-rw-r--r--connectivity/source/drivers/mozab/MCatalog.cxx4
-rw-r--r--connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx6
-rw-r--r--connectivity/source/drivers/odbcbase/OResultSet.cxx8
-rw-r--r--connectivity/source/drivers/odbcbase/OStatement.cxx4
-rw-r--r--connectivity/source/resource/sharedresources.cxx4
-rw-r--r--connectivity/source/simpledbt/refbase.cxx4
-rw-r--r--dbaccess/source/core/api/RowSet.cxx2
-rw-r--r--dbaccess/source/core/api/RowSetRow.hxx4
-rw-r--r--dbaccess/source/core/api/definitioncolumn.cxx8
-rw-r--r--dbaccess/source/core/api/query.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/connection.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx8
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx8
-rw-r--r--dbaccess/source/core/dataaccess/documenteventexecutor.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/documenteventnotifier.cxx4
-rw-r--r--dbaccess/source/core/inc/FilteredContainer.hxx4
-rw-r--r--dbaccess/source/core/misc/ContainerMediator.cxx4
-rw-r--r--dbaccess/source/core/misc/DatabaseDataProvider.cxx4
-rw-r--r--dbaccess/source/core/misc/PropertyForward.cxx4
-rw-r--r--dbaccess/source/core/misc/apitools.cxx4
-rw-r--r--dbaccess/source/core/recovery/settingsimport.cxx4
-rw-r--r--dbaccess/source/core/recovery/subcomponentloader.cxx8
-rw-r--r--dbaccess/source/ui/app/AppController.cxx2
-rw-r--r--dbaccess/source/ui/browser/dbexchange.cxx8
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx4
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx2
-rw-r--r--dbaccess/source/ui/control/toolboxcontroller.cxx4
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx2
-rw-r--r--dbaccess/source/ui/uno/ColumnPeer.cxx4
-rw-r--r--editeng/source/xml/xmltxtexp.cxx4
-rw-r--r--embeddedobj/source/msole/advisesink.cxx2
-rw-r--r--embeddedobj/source/msole/olewrapclient.cxx2
-rw-r--r--embedserv/source/embed/ed_ipersiststr.cxx4
-rw-r--r--embedserv/source/embed/iipaobj.cxx4
-rw-r--r--embedserv/source/embed/servprov.cxx2
-rw-r--r--extensions/source/logging/logger.cxx8
-rw-r--r--extensions/source/ole/servprov.cxx4
-rw-r--r--extensions/source/ole/unoconversionutilities.hxx2
-rw-r--r--extensions/source/propctrlr/composeduiupdate.cxx8
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx4
-rw-r--r--extensions/source/propctrlr/formcontroller.cxx4
-rw-r--r--extensions/source/propctrlr/formgeometryhandler.cxx4
-rw-r--r--extensions/source/propctrlr/formmetadata.cxx4
-rw-r--r--extensions/source/propctrlr/genericpropertyhandler.cxx8
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx4
-rw-r--r--extensions/source/propctrlr/propertycomposer.cxx4
-rw-r--r--extensions/source/propctrlr/sqlcommanddesign.cxx4
-rw-r--r--extensions/source/propctrlr/xsddatatypes.cxx4
-rw-r--r--filter/source/config/cache/lateinitlistener.cxx4
-rw-r--r--forms/source/component/DatabaseForm.cxx8
-rw-r--r--forms/source/component/Date.cxx4
-rw-r--r--forms/source/component/FormComponent.cxx4
-rw-r--r--forms/source/component/FormattedFieldWrapper.cxx4
-rw-r--r--forms/source/component/FormsCollection.cxx4
-rw-r--r--forms/source/component/Grid.cxx4
-rw-r--r--forms/source/component/ImageControl.cxx4
-rw-r--r--forms/source/component/clickableimage.cxx4
-rw-r--r--forms/source/helper/windowstateguard.cxx4
-rw-r--r--forms/source/richtext/rtattributehandler.cxx4
-rw-r--r--fpicker/source/office/asyncfilepicker.cxx4
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx2
-rw-r--r--framework/inc/helper/shareablemutex.hxx4
-rw-r--r--framework/source/fwe/helper/documentundoguard.cxx14
-rw-r--r--framework/source/uiconfiguration/imagemanagerimpl.cxx4
-rw-r--r--io/source/acceptor/acc_pipe.cxx2
-rw-r--r--io/source/acceptor/acc_socket.cxx2
-rw-r--r--io/source/connector/ctr_pipe.cxx2
-rw-r--r--io/source/connector/ctr_socket.cxx2
-rw-r--r--linguistic/source/lngopt.cxx6
-rw-r--r--mysqlc/source/mysqlc_databasemetadata.cxx4
-rw-r--r--mysqlc/source/mysqlc_driver.cxx6
-rw-r--r--o3tl/inc/o3tl/cow_wrapper.hxx4
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx4
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx4
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.cxx4
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx6
-rw-r--r--rdbmaker/inc/codemaker/registry.hxx4
-rw-r--r--rdbmaker/source/codemaker/dependency.cxx4
-rw-r--r--rdbmaker/source/codemaker/typemanager.cxx4
-rw-r--r--reportdesign/source/core/api/FixedLine.cxx4
-rw-r--r--reportdesign/source/core/api/FixedText.cxx4
-rw-r--r--reportdesign/source/core/api/FormattedField.cxx4
-rw-r--r--reportdesign/source/core/api/Group.cxx4
-rw-r--r--reportdesign/source/core/api/ImageControl.cxx4
-rw-r--r--reportdesign/source/core/api/ReportComponent.cxx4
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx12
-rw-r--r--reportdesign/source/core/api/Shape.cxx4
-rw-r--r--reportdesign/source/core/sdr/PropertyForward.cxx4
-rw-r--r--reportdesign/source/core/sdr/UndoEnv.cxx4
-rw-r--r--reportdesign/source/ui/misc/toolboxcontroller.cxx4
-rw-r--r--reportdesign/source/ui/report/ReportControllerObserver.cxx4
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx4
-rw-r--r--sal/inc/rtl/unload.h2
-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
-rw-r--r--sal/rtl/source/byteseq.cxx8
-rw-r--r--sal/rtl/source/unload.cxx4
-rw-r--r--salhelper/inc/salhelper/simplereferenceobject.hxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleCell.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleContextBase.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleCsvControl.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleEditObject.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeader.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewCell.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewTable.cxx2
-rw-r--r--sc/source/ui/unoobj/fielduno.cxx4
-rw-r--r--sc/source/ui/vba/vbawindow.cxx4
-rw-r--r--scripting/source/provider/BrowseNodeFactoryImpl.cxx8
-rw-r--r--sd/source/core/stlsheet.cxx4
-rw-r--r--sd/source/helper/simplereferencecomponent.cxx4
-rw-r--r--sd/source/ui/toolpanel/ToolPanelViewShell.cxx4
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx4
-rw-r--r--sd/workben/custompanel/ctp_panel.cxx4
-rw-r--r--sfx2/workben/custompanel/ctp_panel.cxx4
-rw-r--r--stoc/source/invocation_adapterfactory/iafactory.cxx4
-rw-r--r--stoc/source/proxy_factory/proxyfac.cxx4
-rw-r--r--stoc/source/security/access_controller.cxx4
-rw-r--r--stoc/test/security/test_security.cxx4
-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
-rw-r--r--svx/source/accessibility/AccessibleControlShape.cxx8
-rw-r--r--svx/source/accessibility/charmapacc.cxx12
-rw-r--r--svx/source/accessibility/svxrectctaccessiblecontext.cxx4
-rw-r--r--svx/source/form/ParseContext.cxx4
-rw-r--r--svx/source/form/fmscriptingenv.cxx4
-rw-r--r--svx/source/form/fmtextcontrolfeature.cxx4
-rw-r--r--svx/source/form/fmtextcontrolshell.cxx8
-rw-r--r--svx/source/form/formcontrolling.cxx4
-rw-r--r--svx/source/inc/fmundo.hxx4
-rw-r--r--svx/source/sdr/overlay/overlaymanager.cxx4
-rw-r--r--svx/source/unodraw/unoshape.cxx4
-rw-r--r--svx/source/unodraw/unoshcol.cxx4
-rw-r--r--svx/source/unodraw/unoshtxt.cxx4
-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
-rw-r--r--testtools/source/performance/pseudo.cxx8
-rw-r--r--testtools/source/performance/ubobject.cxx4
-rw-r--r--toolkit/source/controls/formattedcontrol.cxx4
-rw-r--r--toolkit/source/controls/grid/gridcontrol.cxx4
-rw-r--r--toolkit/source/controls/spinningprogress.cxx4
-rw-r--r--toolkit/source/controls/unocontrols.cxx4
-rw-r--r--toolkit/source/helper/accessibilityclient.cxx8
-rw-r--r--ucb/source/ucp/tdoc/tdoc_stgelems.cxx22
-rw-r--r--ucb/source/ucp/tdoc/tdoc_storage.cxx6
-rw-r--r--ucb/source/ucp/webdav/DAVSession.hxx4
-rw-r--r--ucb/source/ucp/webdav/DAVSessionFactory.cxx6
-rw-r--r--ucb/workben/cachemap/cachemapobject1.cxx2
-rw-r--r--ucb/workben/cachemap/cachemapobject1.hxx2
-rw-r--r--ucb/workben/cachemap/cachemapobject3.cxx8
-rw-r--r--ucb/workben/cachemap/cachemapobject3.hxx2
-rw-r--r--xmloff/inc/xmloff/uniref.hxx3
-rw-r--r--xmloff/source/forms/handler/property_handler_base.cxx8
-rw-r--r--xmloff/source/style/uniref.cxx2
239 files changed, 529 insertions, 532 deletions
diff --git a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx
index 3e8848ff86ca..42d71501435c 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx
@@ -99,7 +99,7 @@ AccessibleBrowseBoxBase::~AccessibleBrowseBoxBase()
if( isAlive() )
{
// increment ref count to prevent double call of Dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/accessibility/source/extended/AccessibleGridControlBase.cxx b/accessibility/source/extended/AccessibleGridControlBase.cxx
index a5f78a440002..4583363da7e5 100644
--- a/accessibility/source/extended/AccessibleGridControlBase.cxx
+++ b/accessibility/source/extended/AccessibleGridControlBase.cxx
@@ -74,7 +74,7 @@ AccessibleGridControlBase::~AccessibleGridControlBase()
if( isAlive() )
{
// increment ref count to prevent double call of Dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
index f791ba2e827f..7de4248be5aa 100644
--- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
@@ -84,13 +84,13 @@ namespace accessibility
m_xParent ( _xParent )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
Reference< XComponent > xComp( m_xParent, UNO_QUERY );
if ( xComp.is() )
xComp->addEventListener( this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
void AccessibleIconChoiceCtrlEntry::disposing( const EventObject& _rSource )
@@ -108,7 +108,7 @@ throw(RuntimeException)
if ( IsAlive_Impl() )
{
// increment ref count to prevent double call of Dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index d96754d7b18f..6f8a4649718d 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -59,7 +59,7 @@ namespace accessibility
if ( isAlive() )
{
// increment ref count to prevent double call of Dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index 3b05336dd3be..b491aa99edb4 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -92,7 +92,7 @@ namespace accessibility
if ( IsAlive_Impl() )
{
// increment ref count to prevent double call of Dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/accessibility/source/extended/accessibletablistbox.cxx b/accessibility/source/extended/accessibletablistbox.cxx
index ab353d3ceaa1..cca3a4431078 100644
--- a/accessibility/source/extended/accessibletablistbox.cxx
+++ b/accessibility/source/extended/accessibletablistbox.cxx
@@ -52,11 +52,11 @@ namespace accessibility
,m_pTabListBox( &rBox )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
setCreator( this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
@@ -65,7 +65,7 @@ namespace accessibility
if ( isAlive() )
{
// increment ref count to prevent double call of Dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx b/accessibility/source/extended/accessibletablistboxtable.cxx
index 1c252177c537..0c0570d24624 100644
--- a/accessibility/source/extended/accessibletablistboxtable.cxx
+++ b/accessibility/source/extended/accessibletablistboxtable.cxx
@@ -65,7 +65,7 @@ namespace accessibility
m_pTabListBox = NULL;
// increment ref count to prevent double call of Dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx
index 5125ba45e7e1..1f14f7dd5800 100644
--- a/accessibility/source/helper/acc_factory.cxx
+++ b/accessibility/source/helper/acc_factory.cxx
@@ -254,13 +254,13 @@ inline bool hasFloatingChild(Window *pWindow)
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL AccessibleFactory::acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL AccessibleFactory::release()
{
- if ( 0 == osl_decrementInterlockedCount( &m_refCount ) )
+ if ( 0 == osl_atomic_decrement( &m_refCount ) )
{
delete this;
return 0;
diff --git a/basctl/source/basicide/doceventnotifier.cxx b/basctl/source/basicide/doceventnotifier.cxx
index a36ce20a80aa..56559e56b4cb 100644
--- a/basctl/source/basicide/doceventnotifier.cxx
+++ b/basctl/source/basicide/doceventnotifier.cxx
@@ -105,9 +105,9 @@ namespace basctl
m_pListener(&rListener),
m_xModel(rxDocument)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
impl_listenerAction_nothrow( RegisterListener );
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index f851b5a057aa..3257a4ad5214 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -173,7 +173,7 @@ DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar ), mName( pV
if ( m_xAggProxy.is() )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
/* i35609 - Fix crash on Solaris. The setDelegator call needs
to be in its own block to ensure that all temporary Reference
@@ -183,7 +183,7 @@ DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar ), mName( pV
m_xAggProxy->setDelegator( static_cast< cppu::OWeakObject * >( this ) );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
}
}
@@ -192,13 +192,13 @@ DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar ), mName( pV
void SAL_CALL
DocObjectWrapper::acquire() throw ()
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
OSL_TRACE("DocObjectWrapper::acquire(%s) 0x%x refcount is now %d", rtl::OUStringToOString( mName, RTL_TEXTENCODING_UTF8 ).getStr(), this, m_refCount );
}
void SAL_CALL
DocObjectWrapper::release() throw ()
{
- if ( osl_decrementInterlockedCount( &m_refCount ) == 0 )
+ if ( osl_atomic_decrement( &m_refCount ) == 0 )
{
OSL_TRACE("DocObjectWrapper::release(%s) 0x%x refcount is now %d", rtl::OUStringToOString( mName, RTL_TEXTENCODING_UTF8 ).getStr(), this, m_refCount );
delete this;
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 091f04f96bbb..f8d946edd69c 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -578,9 +578,9 @@ void SfxLibraryContainer::init( const OUString& rInitialDocumentURL, const uno::
// this might be called from within the ctor, and the impl_init might (indirectly) create
// an UNO reference to ourself.
// Ensure that we're not destroyed while we're in here
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
init_Impl( rInitialDocumentURL, rxInitialStorage );
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
diff --git a/binaryurp/source/proxy.cxx b/binaryurp/source/proxy.cxx
index 4d01b2b66778..fde8b31cbd4d 100644
--- a/binaryurp/source/proxy.cxx
+++ b/binaryurp/source/proxy.cxx
@@ -84,13 +84,13 @@ css::uno::TypeDescription Proxy::getType() const {
}
void Proxy::do_acquire() {
- if (osl_incrementInterlockedCount(&references_) == 1) {
+ if (osl_atomic_increment(&references_) == 1) {
bridge_->resurrectProxy(*this);
}
}
void Proxy::do_release() {
- if (osl_decrementInterlockedCount(&references_) == 0) {
+ if (osl_atomic_decrement(&references_) == 0) {
bridge_->revokeProxy(*this);
}
}
diff --git a/bridges/inc/bridges/cpp_uno/bridge.hxx b/bridges/inc/bridges/cpp_uno/bridge.hxx
index 14126647c518..96af924e734a 100644
--- a/bridges/inc/bridges/cpp_uno/bridge.hxx
+++ b/bridges/inc/bridges/cpp_uno/bridge.hxx
@@ -102,7 +102,7 @@ inline void SAL_CALL cppu_Mapping_uno2cpp(
//__________________________________________________________________________________________________
inline void cppu_cppInterfaceProxy::acquireProxy() SAL_THROW(())
{
- if (1 == osl_incrementInterlockedCount( &nRef ))
+ if (1 == osl_atomic_increment( &nRef ))
{
// rebirth of proxy zombie
// register at cpp env
@@ -116,7 +116,7 @@ inline void cppu_cppInterfaceProxy::acquireProxy() SAL_THROW(())
//__________________________________________________________________________________________________
inline void cppu_cppInterfaceProxy::releaseProxy() SAL_THROW(())
{
- if (! osl_decrementInterlockedCount( &nRef )) // last release
+ if (! osl_atomic_decrement( &nRef )) // last release
{
// revoke from cpp env
(*pBridge->pCppEnv->revokeInterface)(
@@ -170,7 +170,7 @@ inline void SAL_CALL cppu_unoInterfaceProxy_free( uno_ExtEnvironment * pEnv, voi
//--------------------------------------------------------------------------------------------------
inline void SAL_CALL cppu_unoInterfaceProxy_acquire( uno_Interface * pUnoI ) SAL_THROW(())
{
- if (1 == osl_incrementInterlockedCount( & static_cast< cppu_unoInterfaceProxy * >( pUnoI )->nRef ))
+ if (1 == osl_atomic_increment( & static_cast< cppu_unoInterfaceProxy * >( pUnoI )->nRef ))
{
// rebirth of proxy zombie
// register at uno env
@@ -191,7 +191,7 @@ inline void SAL_CALL cppu_unoInterfaceProxy_acquire( uno_Interface * pUnoI ) SAL
//--------------------------------------------------------------------------------------------------
inline void SAL_CALL cppu_unoInterfaceProxy_release( uno_Interface * pUnoI ) SAL_THROW(())
{
- if (! osl_decrementInterlockedCount( & static_cast< cppu_unoInterfaceProxy * >( pUnoI )->nRef ))
+ if (! osl_atomic_decrement( & static_cast< cppu_unoInterfaceProxy * >( pUnoI )->nRef ))
{
// revoke from uno env on last release
(*static_cast< cppu_unoInterfaceProxy * >( pUnoI )->pBridge->pUnoEnv->revokeInterface)(
@@ -320,7 +320,7 @@ inline void SAL_CALL cppu_Bridge_free( uno_Mapping * pMapping ) SAL_THROW(())
//__________________________________________________________________________________________________
inline void cppu_Bridge::acquire() SAL_THROW(())
{
- if (1 == osl_incrementInterlockedCount( &nRef ))
+ if (1 == osl_atomic_increment( &nRef ))
{
if (bExportCpp2Uno)
{
@@ -341,7 +341,7 @@ inline void cppu_Bridge::acquire() SAL_THROW(())
//__________________________________________________________________________________________________
inline void cppu_Bridge::release() SAL_THROW(())
{
- if (! osl_decrementInterlockedCount( &nRef ))
+ if (! osl_atomic_decrement( &nRef ))
{
::uno_revokeMapping( bExportCpp2Uno ? &aCpp2Uno : &aUno2Cpp );
}
diff --git a/bridges/source/cpp_uno/shared/bridge.cxx b/bridges/source/cpp_uno/shared/bridge.cxx
index 4523f20061a3..cefb62ef3453 100644
--- a/bridges/source/cpp_uno/shared/bridge.cxx
+++ b/bridges/source/cpp_uno/shared/bridge.cxx
@@ -153,7 +153,7 @@ uno_Mapping * Bridge::createMapping(
void Bridge::acquire() SAL_THROW(())
{
- if (1 == osl_incrementInterlockedCount( &nRef ))
+ if (1 == osl_atomic_increment( &nRef ))
{
if (bExportCpp2Uno)
{
@@ -174,7 +174,7 @@ void Bridge::acquire() SAL_THROW(())
void Bridge::release() SAL_THROW(())
{
- if (! osl_decrementInterlockedCount( &nRef ))
+ if (! osl_atomic_decrement( &nRef ))
{
::uno_revokeMapping( bExportCpp2Uno ? &aCpp2Uno : &aUno2Cpp );
}
diff --git a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
index 36942481fefc..cc8c4d947e8f 100644
--- a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
+++ b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
@@ -129,7 +129,7 @@ com::sun::star::uno::XInterface * CppInterfaceProxy::create(
void CppInterfaceProxy::acquireProxy() SAL_THROW(())
{
- if (1 == osl_incrementInterlockedCount( &nRef ))
+ if (1 == osl_atomic_increment( &nRef ))
{
// rebirth of proxy zombie
// register at cpp env
@@ -143,7 +143,7 @@ void CppInterfaceProxy::acquireProxy() SAL_THROW(())
void CppInterfaceProxy::releaseProxy() SAL_THROW(())
{
- if (! osl_decrementInterlockedCount( &nRef )) // last release
+ if (! osl_atomic_decrement( &nRef )) // last release
{
// revoke from cpp env
(*pBridge->getCppEnv()->revokeInterface)(
diff --git a/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx b/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx
index 247b31454e4d..81353cff7682 100644
--- a/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx
+++ b/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx
@@ -54,7 +54,7 @@ void freeUnoInterfaceProxy(uno_ExtEnvironment * pEnv, void * pProxy)
void acquireProxy(uno_Interface * pUnoI)
{
- if (1 == osl_incrementInterlockedCount(
+ if (1 == osl_atomic_increment(
& static_cast< UnoInterfaceProxy * >( pUnoI )->nRef ))
{
// rebirth of proxy zombie
@@ -76,7 +76,7 @@ void acquireProxy(uno_Interface * pUnoI)
void releaseProxy(uno_Interface * pUnoI)
{
- if (! osl_decrementInterlockedCount(
+ if (! osl_atomic_decrement(
& static_cast< UnoInterfaceProxy * >( pUnoI )->nRef ))
{
// revoke from uno env on last release
diff --git a/bridges/source/jni_uno/jni_bridge.cxx b/bridges/source/jni_uno/jni_bridge.cxx
index be46d1de64fd..51ab45939738 100644
--- a/bridges/source/jni_uno/jni_bridge.cxx
+++ b/bridges/source/jni_uno/jni_bridge.cxx
@@ -214,7 +214,7 @@ namespace jni_uno
//______________________________________________________________________________
void Bridge::acquire() const SAL_THROW(())
{
- if (1 == osl_incrementInterlockedCount( &m_ref ))
+ if (1 == osl_atomic_increment( &m_ref ))
{
if (m_registered_java2uno)
{
@@ -236,7 +236,7 @@ void Bridge::acquire() const SAL_THROW(())
//______________________________________________________________________________
void Bridge::release() const SAL_THROW(())
{
- if (! osl_decrementInterlockedCount( &m_ref ))
+ if (! osl_atomic_decrement( &m_ref ))
{
uno_revokeMapping(
m_registered_java2uno
diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx
index b38aad90391f..a7ae60cb02a7 100644
--- a/bridges/source/jni_uno/jni_uno2java.cxx
+++ b/bridges/source/jni_uno/jni_uno2java.cxx
@@ -479,7 +479,7 @@ inline UNO_proxy::UNO_proxy(
//______________________________________________________________________________
inline void UNO_proxy::acquire() const
{
- if (1 == osl_incrementInterlockedCount( &m_ref ))
+ if (1 == osl_atomic_increment( &m_ref ))
{
// rebirth of proxy zombie
void * that = const_cast< UNO_proxy * >( this );
@@ -497,7 +497,7 @@ inline void UNO_proxy::acquire() const
//______________________________________________________________________________
inline void UNO_proxy::release() const
{
- if (0 == osl_decrementInterlockedCount( &m_ref ))
+ if (0 == osl_atomic_decrement( &m_ref ))
{
// revoke from uno env on last release
(*m_bridge->m_uno_env->revokeInterface)(
diff --git a/bridges/test/java_uno/acquire/testacquire.cxx b/bridges/test/java_uno/acquire/testacquire.cxx
index fcf7fde15099..f3216fb15a07 100644
--- a/bridges/test/java_uno/acquire/testacquire.cxx
+++ b/bridges/test/java_uno/acquire/testacquire.cxx
@@ -99,7 +99,7 @@ public:
throw (css::uno::RuntimeException);
virtual void SAL_CALL acquire() throw ()
- { osl_incrementInterlockedCount(&m_refCount); }
+ { osl_atomic_increment(&m_refCount); }
virtual void SAL_CALL release() throw ();
@@ -125,7 +125,7 @@ css::uno::Any Interface::queryInterface(css::uno::Type const & type)
}
void Interface::release() throw () {
- if (osl_decrementInterlockedCount(&m_refCount) == 0) {
+ if (osl_atomic_decrement(&m_refCount) == 0) {
delete this;
}
}
diff --git a/bridges/test/performance/testperformance.cxx b/bridges/test/performance/testperformance.cxx
index 87fcd910cb11..36102aca31c4 100644
--- a/bridges/test/performance/testperformance.cxx
+++ b/bridges/test/performance/testperformance.cxx
@@ -95,7 +95,7 @@ void main()
oslInterlockedCount count;
for( int i = 0 ; i < 1000*10000 ; i ++ )
{
- osl_incrementInterlockedCount( &count );
+ osl_atomic_increment( &count );
}
}
{
diff --git a/bridges/test/testcomp.cxx b/bridges/test/testcomp.cxx
index 26885b295224..16fa2d4958d9 100644
--- a/bridges/test/testcomp.cxx
+++ b/bridges/test/testcomp.cxx
@@ -157,9 +157,9 @@ public:
return aRet;
}
virtual void SAL_CALL acquire() throw()
- { osl_incrementInterlockedCount( &_nRef ); }
+ { osl_atomic_increment( &_nRef ); }
virtual void SAL_CALL release() throw()
- { if (! osl_decrementInterlockedCount( &_nRef )) delete this; }
+ { if (! osl_atomic_decrement( &_nRef )) delete this; }
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw (RuntimeException);
diff --git a/canvas/source/null/null_usagecounter.hxx b/canvas/source/null/null_usagecounter.hxx
index 154857c65c13..5a3260e47714 100644
--- a/canvas/source/null/null_usagecounter.hxx
+++ b/canvas/source/null/null_usagecounter.hxx
@@ -38,12 +38,12 @@ namespace nullcanvas
{
OSL_TRACE( "%s, %d objects currently in use.\n",
BOOST_CURRENT_FUNCTION,
- osl_incrementInterlockedCount( &s_nCount ) );
+ osl_atomic_increment( &s_nCount ) );
}
~UsageCounter()
{
- const sal_Int32 nCount( osl_decrementInterlockedCount( &s_nCount ) );
+ const sal_Int32 nCount( osl_atomic_decrement( &s_nCount ) );
if( !nCount )
{
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
index 17d9044a18ab..83ceca4a589c 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
@@ -414,9 +414,9 @@ ChartDataWrapper::ChartDataWrapper( ::boost::shared_ptr< Chart2ModelContact > sp
m_spChart2ModelContact( spChart2ModelContact ),
m_aEventListenerContainer( m_aMutex )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
initDataAccess();
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
ChartDataWrapper::ChartDataWrapper( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
@@ -424,10 +424,10 @@ ChartDataWrapper::ChartDataWrapper( ::boost::shared_ptr< Chart2ModelContact > sp
m_spChart2ModelContact( spChart2ModelContact ),
m_aEventListenerContainer( m_aMutex )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
lcl_AllOperator aOperator( xNewData );
applyData( aOperator );
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
ChartDataWrapper::~ChartDataWrapper()
diff --git a/chart2/source/controller/main/ShapeToolbarController.cxx b/chart2/source/controller/main/ShapeToolbarController.cxx
index e951a2a28a95..e56ce128b1cf 100644
--- a/chart2/source/controller/main/ShapeToolbarController.cxx
+++ b/chart2/source/controller/main/ShapeToolbarController.cxx
@@ -76,9 +76,9 @@ ShapeToolbarController::ShapeToolbarController( const Reference< lang::XMultiSer
,m_nToolBoxId( 1 )
,m_nSlotId( 0 )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_xServiceManager = rxFact;
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
ShapeToolbarController::~ShapeToolbarController()
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index 67a10800578e..5e0d07e6e4aa 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -312,7 +312,7 @@ Axis::Axis( Reference< uno::XComponentContext > const & /* xContext */ ) :
m_aSubGridProperties(),
m_xTitle()
{
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
setFastPropertyValue_NoBroadcast(
::chart::LineProperties::PROP_LINE_COLOR, uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) ) ); // gray30
@@ -322,7 +322,7 @@ Axis::Axis( Reference< uno::XComponentContext > const & /* xContext */ ) :
ModifyListenerHelper::addListener( m_aScaleData.Categories, m_xModifyEventForwarder );
AllocateSubGrids();
- osl_decrementInterlockedCount(&m_refCount);
+ osl_atomic_decrement(&m_refCount);
}
Axis::Axis( const Axis & rOther ) :
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 01f2776273c3..ff09525040b5 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -108,7 +108,7 @@ ChartModel::ChartModel(uno::Reference<uno::XComponentContext > const & xContext)
{
OSL_TRACE( "ChartModel: CTOR called" );
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
{
m_xOldModelAgg.set(
m_xContext->getServiceManager()->createInstanceWithContext(
@@ -122,7 +122,7 @@ ChartModel::ChartModel(uno::Reference<uno::XComponentContext > const & xContext)
m_xChartTypeManager.set( xContext->getServiceManager()->createInstanceWithContext(
C2U( "com.sun.star.chart2.ChartTypeManager" ), m_xContext ), uno::UNO_QUERY );
}
- osl_decrementInterlockedCount(&m_refCount);
+ osl_atomic_decrement(&m_refCount);
}
ChartModel::ChartModel( const ChartModel & rOther )
@@ -148,7 +148,7 @@ ChartModel::ChartModel( const ChartModel & rOther )
{
OSL_TRACE( "ChartModel: Copy-CTOR called" );
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
{
m_xOldModelAgg.set(
m_xContext->getServiceManager()->createInstanceWithContext(
@@ -178,7 +178,7 @@ ChartModel::ChartModel( const ChartModel & rOther )
ModifyListenerHelper::addListener( xNewPageBackground, xListener );
xListener.clear();
}
- osl_decrementInterlockedCount(&m_refCount);
+ osl_atomic_decrement(&m_refCount);
}
ChartModel::~ChartModel()
diff --git a/cli_ure/source/uno_bridge/cli_bridge.cxx b/cli_ure/source/uno_bridge/cli_bridge.cxx
index aed48dfb6e29..53329e8d80b6 100644
--- a/cli_ure/source/uno_bridge/cli_bridge.cxx
+++ b/cli_ure/source/uno_bridge/cli_bridge.cxx
@@ -187,7 +187,7 @@ namespace cli_uno
*/
void Bridge::acquire() const SAL_THROW(())
{
- if (1 == osl_incrementInterlockedCount( &m_ref ))
+ if (1 == osl_atomic_increment( &m_ref ))
{
if (m_registered_cli2uno)
{
@@ -206,7 +206,7 @@ void Bridge::acquire() const SAL_THROW(())
//__________________________________________________________________________________________________
void Bridge::release() const SAL_THROW(())
{
- if (! osl_decrementInterlockedCount( &m_ref ))
+ if (! osl_atomic_decrement( &m_ref ))
{
uno_revokeMapping(
m_registered_cli2uno
diff --git a/cli_ure/source/uno_bridge/cli_proxy.cxx b/cli_ure/source/uno_bridge/cli_proxy.cxx
index 76a58dd29a64..2fd70fc5ede3 100644
--- a/cli_ure/source/uno_bridge/cli_proxy.cxx
+++ b/cli_ure/source/uno_bridge/cli_proxy.cxx
@@ -909,7 +909,7 @@ void SAL_CALL CliProxy::uno_DispatchMethod(
}
inline void CliProxy::acquire() const
{
- if (1 == osl_incrementInterlockedCount( &m_ref ))
+ if (1 == osl_atomic_increment( &m_ref ))
{
// rebirth of proxy zombie
void * that = const_cast< CliProxy * >( this );
@@ -926,7 +926,7 @@ inline void CliProxy::acquire() const
//---------------------------------------------------------------------------
inline void CliProxy::release() const
{
- if (0 == osl_decrementInterlockedCount( &m_ref ))
+ if (0 == osl_atomic_decrement( &m_ref ))
{
// revoke from uno env on last release,
// The proxy can be resurrected if acquire is called before the uno
diff --git a/codemaker/source/codemaker/typemanager.cxx b/codemaker/source/codemaker/typemanager.cxx
index c5add3e2e9a3..d223e48f47f3 100644
--- a/codemaker/source/codemaker/typemanager.cxx
+++ b/codemaker/source/codemaker/typemanager.cxx
@@ -41,13 +41,13 @@ TypeManager::~TypeManager()
sal_Int32 TypeManager::acquire()
{
- return osl_incrementInterlockedCount(&m_pImpl->m_refCount);
+ return osl_atomic_increment(&m_pImpl->m_refCount);
}
sal_Int32 TypeManager::release()
{
sal_Int32 refCount = 0;
- if (0 == (refCount = osl_decrementInterlockedCount(&m_pImpl->m_refCount)) )
+ if (0 == (refCount = osl_atomic_decrement(&m_pImpl->m_refCount)) )
{
delete m_pImpl;
}
diff --git a/comphelper/inc/comphelper/uno3.hxx b/comphelper/inc/comphelper/uno3.hxx
index 935221c45b6f..1b83c73f4f25 100644
--- a/comphelper/inc/comphelper/uno3.hxx
+++ b/comphelper/inc/comphelper/uno3.hxx
@@ -35,8 +35,8 @@ namespace comphelper
//=========================================================================
/// manipulate ref counts without calling acquire/release
- inline oslInterlockedCount increment(oslInterlockedCount& _counter) { return osl_incrementInterlockedCount(&_counter); }
- inline oslInterlockedCount decrement(oslInterlockedCount& _counter) { return osl_decrementInterlockedCount(&_counter); }
+ inline oslInterlockedCount increment(oslInterlockedCount& _counter) { return osl_atomic_increment(&_counter); }
+ inline oslInterlockedCount decrement(oslInterlockedCount& _counter) { return osl_atomic_decrement(&_counter); }
//=========================================================================
diff --git a/comphelper/source/misc/SelectionMultiplex.cxx b/comphelper/source/misc/SelectionMultiplex.cxx
index aa3092d1886d..d4cca73a7da0 100644
--- a/comphelper/source/misc/SelectionMultiplex.cxx
+++ b/comphelper/source/misc/SelectionMultiplex.cxx
@@ -76,12 +76,12 @@ OSelectionChangeMultiplexer::OSelectionChangeMultiplexer(OSelectionChangeListene
,m_bAutoSetRelease(_bAutoReleaseSet)
{
m_pListener->setAdapter(this);
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
{
Reference< XSelectionChangeListener> xPreventDelete(this);
m_xSet->addSelectionChangeListener(xPreventDelete);
}
- osl_decrementInterlockedCount(&m_refCount);
+ osl_atomic_decrement(&m_refCount);
}
//------------------------------------------------------------------
diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx
index 26e85c6f6231..20276067a117 100644
--- a/comphelper/source/misc/accessiblewrapper.cxx
+++ b/comphelper/source/misc/accessiblewrapper.cxx
@@ -401,13 +401,13 @@ namespace comphelper
componentAggregateProxyFor( xInnerComponent, _rRefCount, _rDelegator );
// add as event listener to the inner context, because we want to multiplex the AccessibleEvents
- osl_incrementInterlockedCount( &_rRefCount );
+ osl_atomic_increment( &_rRefCount );
{
Reference< XAccessibleEventBroadcaster > xBroadcaster( m_xInner, UNO_QUERY );
if ( xBroadcaster.is() )
xBroadcaster->addEventListener( this );
}
- osl_decrementInterlockedCount( &_rRefCount );
+ osl_atomic_decrement( &_rRefCount );
}
//--------------------------------------------------------------------
diff --git a/comphelper/source/misc/asyncnotification.cxx b/comphelper/source/misc/asyncnotification.cxx
index 9b799d219cf1..308ba4a11e44 100644
--- a/comphelper/source/misc/asyncnotification.cxx
+++ b/comphelper/source/misc/asyncnotification.cxx
@@ -50,13 +50,13 @@ namespace comphelper
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL AnyEvent::acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL AnyEvent::release()
{
- if ( 0 == osl_decrementInterlockedCount( &m_refCount ) )
+ if ( 0 == osl_atomic_decrement( &m_refCount ) )
{
delete this;
return 0;
diff --git a/comphelper/source/misc/componentmodule.cxx b/comphelper/source/misc/componentmodule.cxx
index 409714893885..8a4cc74f8ced 100644
--- a/comphelper/source/misc/componentmodule.cxx
+++ b/comphelper/source/misc/componentmodule.cxx
@@ -85,7 +85,7 @@ namespace comphelper
void OModule::registerClient( OModule::ClientAccess )
{
::osl::MutexGuard aGuard(m_aMutex);
- if ( 1 == osl_incrementInterlockedCount( &m_nClients ) )
+ if ( 1 == osl_atomic_increment( &m_nClients ) )
onFirstClient();
}
@@ -93,7 +93,7 @@ namespace comphelper
void OModule::revokeClient( OModule::ClientAccess )
{
::osl::MutexGuard aGuard(m_aMutex);
- if ( 0 == osl_decrementInterlockedCount( &m_nClients ) )
+ if ( 0 == osl_atomic_decrement( &m_nClients ) )
onLastClient();
}
diff --git a/comphelper/source/misc/proxyaggregation.cxx b/comphelper/source/misc/proxyaggregation.cxx
index e98b21eb093b..6d190ff91b14 100644
--- a/comphelper/source/misc/proxyaggregation.cxx
+++ b/comphelper/source/misc/proxyaggregation.cxx
@@ -59,7 +59,7 @@ namespace comphelper
m_xProxyAggregate->queryAggregation( ::getCppuType( &m_xProxyTypeAccess ) ) >>= m_xProxyTypeAccess;
// aggregate the proxy
- osl_incrementInterlockedCount( &_rRefCount );
+ osl_atomic_increment( &_rRefCount );
if ( m_xProxyAggregate.is() )
{
// At this point in time, the proxy has a ref count of exactly two - in m_xControlContextProxy,
@@ -67,7 +67,7 @@ namespace comphelper
// Remember to _not_ reset these members unless the delegator of the proxy has been reset, too!
m_xProxyAggregate->setDelegator( _rDelegator );
}
- osl_decrementInterlockedCount( &_rRefCount );
+ osl_atomic_decrement( &_rRefCount );
}
}
@@ -124,12 +124,12 @@ namespace comphelper
baseAggregateProxyFor( m_xInner.get(), _rRefCount, _rDelegator );
// add as event listener to the inner context, because we want to be notified of disposals
- osl_incrementInterlockedCount( &_rRefCount );
+ osl_atomic_increment( &_rRefCount );
{
if ( m_xInner.is() )
m_xInner->addEventListener( this );
}
- osl_decrementInterlockedCount( &_rRefCount );
+ osl_atomic_decrement( &_rRefCount );
}
//-------------------------------------------------------------------------
diff --git a/comphelper/source/misc/weakeventlistener.cxx b/comphelper/source/misc/weakeventlistener.cxx
index 288b15995f37..db176d4b643a 100644
--- a/comphelper/source/misc/weakeventlistener.cxx
+++ b/comphelper/source/misc/weakeventlistener.cxx
@@ -48,11 +48,11 @@ namespace comphelper
OSL_ENSURE( _rxBroadcaster.is(), "OWeakEventListenerAdapter::OWeakEventListenerAdapter: invalid broadcaster!" );
if ( _rxBroadcaster.is() )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
_rxBroadcaster->addEventListener( this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
OSL_ENSURE( m_refCount > 0, "OWeakEventListenerAdapter::OWeakEventListenerAdapter: oops - not to be used with implementations which hold their listeners weak!" );
// the one and only reason for this adapter class (A) is to add as listener to a component (C) which
// holds its listeners hard, and forward all calls then to another listener (L) which is
diff --git a/connectivity/inc/connectivity/CommonTools.hxx b/connectivity/inc/connectivity/CommonTools.hxx
index ac1c0d9738d3..6a1dfc9de9ad 100644
--- a/connectivity/inc/connectivity/CommonTools.hxx
+++ b/connectivity/inc/connectivity/CommonTools.hxx
@@ -101,11 +101,11 @@ namespace connectivity
void acquire()
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
}
void release()
{
- if (! osl_decrementInterlockedCount( &m_refCount ))
+ if (! osl_atomic_decrement( &m_refCount ))
delete this;
}
diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx
index 79df7866e261..7b3f14f235f9 100644
--- a/connectivity/source/commontools/ConnectionWrapper.cxx
+++ b/connectivity/source/commontools/ConnectionWrapper.cxx
@@ -45,7 +45,7 @@ OConnectionWrapper::OConnectionWrapper()
void OConnectionWrapper::setDelegation(Reference< XAggregation >& _rxProxyConnection,oslInterlockedCount& _rRefCount)
{
OSL_ENSURE(_rxProxyConnection.is(),"OConnectionWrapper: Connection must be valid!");
- osl_incrementInterlockedCount( &_rRefCount );
+ osl_atomic_increment( &_rRefCount );
if (_rxProxyConnection.is())
{
// transfer the (one and only) real ref to the aggregate to our member
@@ -61,7 +61,7 @@ void OConnectionWrapper::setDelegation(Reference< XAggregation >& _rxProxyConnec
m_xProxyConnection->setDelegator( xIf );
}
- osl_decrementInterlockedCount( &_rRefCount );
+ osl_atomic_decrement( &_rRefCount );
}
// -----------------------------------------------------------------------------
void OConnectionWrapper::setDelegation(const Reference< XConnection >& _xConnection
@@ -69,7 +69,7 @@ void OConnectionWrapper::setDelegation(const Reference< XConnection >& _xConnect
,oslInterlockedCount& _rRefCount)
{
OSL_ENSURE(_xConnection.is(),"OConnectionWrapper: Connection must be valid!");
- osl_incrementInterlockedCount( &_rRefCount );
+ osl_atomic_increment( &_rRefCount );
m_xConnection = _xConnection;
m_xTypeProvider.set(m_xConnection,UNO_QUERY);
@@ -88,7 +88,7 @@ void OConnectionWrapper::setDelegation(const Reference< XConnection >& _xConnect
m_xProxyConnection->setDelegator( xIf );
}
- osl_decrementInterlockedCount( &_rRefCount );
+ osl_atomic_decrement( &_rRefCount );
}
// -----------------------------------------------------------------------------
void OConnectionWrapper::disposing()
diff --git a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx
index 1d10e77ad7c7..f72748ea5c17 100644
--- a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx
+++ b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx
@@ -54,14 +54,14 @@ ODatabaseMetaDataBase::ODatabaseMetaDataBase(const Reference< XConnection >& _rx
,m_storesMixedCaseQuotedIdentifiers(false,sal_False)
, m_xConnection(_rxConnection)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_xListenerHelper = new OEventListenerHelper(this);
Reference<XComponent> xCom(m_xConnection,UNO_QUERY);
if(xCom.is())
xCom->addEventListener(m_xListenerHelper);
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
ODatabaseMetaDataBase::~ODatabaseMetaDataBase()
diff --git a/connectivity/source/commontools/TPrivilegesResultSet.cxx b/connectivity/source/commontools/TPrivilegesResultSet.cxx
index ce5f4466d0c3..f911f3e3e298 100644
--- a/connectivity/source/commontools/TPrivilegesResultSet.cxx
+++ b/connectivity/source/commontools/TPrivilegesResultSet.cxx
@@ -35,7 +35,7 @@ OResultSetPrivileges::OResultSetPrivileges( const Reference< XDatabaseMetaData>&
: ODatabaseMetaDataResultSet(eTablePrivileges)
, m_bResetValues(sal_True)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
::rtl::OUString sUserWorkingFor;
Sequence< ::rtl::OUString > sTableTypes(3);
@@ -79,7 +79,7 @@ OResultSetPrivileges::OResultSetPrivileges( const Reference< XDatabaseMetaData>&
setRows(aRows);
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------------------
const ORowSetValue& OResultSetPrivileges::getValue(sal_Int32 columnIndex)
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 96639c641a09..f175c3ed5a66 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -2063,9 +2063,9 @@ void release(oslInterlockedCount& _refCount,
Reference< XInterface >& _xInterface,
::com::sun::star::lang::XComponent* _pObject)
{
- if (osl_decrementInterlockedCount( &_refCount ) == 0)
+ if (osl_atomic_decrement( &_refCount ) == 0)
{
- osl_incrementInterlockedCount( &_refCount );
+ osl_atomic_increment( &_refCount );
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
{
@@ -2095,7 +2095,7 @@ void release(oslInterlockedCount& _refCount,
}
}
else
- osl_incrementInterlockedCount( &_refCount );
+ osl_atomic_increment( &_refCount );
}
void checkDisposed(sal_Bool _bThrow) throw ( DisposedException )
diff --git a/connectivity/source/cpool/ZConnectionWrapper.cxx b/connectivity/source/cpool/ZConnectionWrapper.cxx
index ada53c1dec94..5666afce188c 100644
--- a/connectivity/source/cpool/ZConnectionWrapper.cxx
+++ b/connectivity/source/cpool/ZConnectionWrapper.cxx
@@ -43,7 +43,7 @@ OConnectionWeakWrapper::~OConnectionWeakWrapper()
{
if ( !OConnectionWeakWrapper_BASE::rBHelper.bDisposed )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/connectivity/source/cpool/ZDriverWrapper.cxx b/connectivity/source/cpool/ZDriverWrapper.cxx
index d2d71262c005..12887634dec5 100644
--- a/connectivity/source/cpool/ZDriverWrapper.cxx
+++ b/connectivity/source/cpool/ZDriverWrapper.cxx
@@ -43,7 +43,7 @@ namespace connectivity
if (m_pConnectionPool)
m_pConnectionPool->acquire();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
if (_rxAggregateDriver.is())
{
// transfer the (one and only) real ref to the aggregate to our member
@@ -57,7 +57,7 @@ namespace connectivity
// set ourself as delegator
m_xDriverAggregate->setDelegator( static_cast< XWeak* >( this ) );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index 9b7fa7370a6f..7740379990e6 100644
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -88,7 +88,7 @@ OPoolCollection::OPoolCollection(const Reference< XMultiServiceFactory >& _rxF
if ( xProp.is() )
xProp->addPropertyChangeListener(getEnablePoolingNodeName(),this);
// attach as desktop listener to know when we have to release our pools
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_xDesktop = Reference< ::com::sun::star::frame::XDesktop>( m_xServiceFactory->createInstance(::rtl::OUString("com.sun.star.frame.Desktop") ), UNO_QUERY);
@@ -96,7 +96,7 @@ OPoolCollection::OPoolCollection(const Reference< XMultiServiceFactory >& _rxF
m_xDesktop->addTerminateListener(this);
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
OPoolCollection::~OPoolCollection()
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index f893bcad2a88..2b24b24d67ed 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -56,7 +56,7 @@ OConnection::OConnection(ODriver* _pDriver) throw(SQLException, RuntimeExcepti
m_bClosed(sal_False),
m_bAutocommit(sal_True)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
IClassFactory2* pIUnknown = NULL;
IUnknown *pOuter = NULL;
@@ -90,7 +90,7 @@ OConnection::OConnection(ODriver* _pDriver) throw(SQLException, RuntimeExcepti
pIUnknown->Release();
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//-----------------------------------------------------------------------------
OConnection::~OConnection()
@@ -99,7 +99,7 @@ OConnection::~OConnection()
//-----------------------------------------------------------------------------
void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyValue >& info)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
setConnectionInfo(info);
@@ -152,10 +152,10 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
}
catch(const Exception& )
{
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
throw;
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//-----------------------------------------------------------------------------
void SAL_CALL OConnection::release() throw()
diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
index 31bb5ec36fe5..61ec5d5f6e43 100644
--- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
@@ -60,7 +60,7 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet(ADORecordset* _pRecordSet
,m_bEOF(sal_False)
,m_bOnFirstAfterOpen(sal_False)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_aColMapping.push_back(-1);
if(_pRecordSet)
{
@@ -71,7 +71,7 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet(ADORecordset* _pRecordSet
}
else
m_bOnFirstAfterOpen = sal_False;
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
// allocBuffer();
}
diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx
index d12d0c2179aa..fd1e0b196b92 100644
--- a/connectivity/source/drivers/ado/APreparedStatement.cxx
+++ b/connectivity/source/drivers/ado/APreparedStatement.cxx
@@ -57,7 +57,7 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OTypeInf
: OStatement_Base( _pConnection )
,m_aTypeInfo(_TypeInfo)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
OSQLParser aParser(_pConnection->getDriver()->getORB());
::rtl::OUString sErrorMessage;
@@ -80,7 +80,7 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OTypeInf
m_pParameters->AddRef();
m_pParameters->Refresh();
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/ado/AResultSet.cxx b/connectivity/source/drivers/ado/AResultSet.cxx
index b1dc8729859b..2e10ea9e6f96 100644
--- a/connectivity/source/drivers/ado/AResultSet.cxx
+++ b/connectivity/source/drivers/ado/AResultSet.cxx
@@ -104,19 +104,19 @@ OResultSet::OResultSet(ADORecordset* _pRecordSet) : OResultSet_BASE(m_aMutex)
// -----------------------------------------------------------------------------
void OResultSet::construct()
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
if (!m_pRecordSet)
{
OSL_FAIL( "OResultSet::construct: no RecordSet!" );
Reference< XInterface > xInt( *this );
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
::dbtools::throwFunctionSequenceException( xInt );
}
m_pRecordSet->AddRef();
VARIANT_BOOL bIsAtBOF;
CHECK_RETURN(m_pRecordSet->get_BOF(&bIsAtBOF))
m_bOnFirstAfterOpen = bIsAtBOF != VARIANT_TRUE;
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
OResultSet::~OResultSet()
diff --git a/connectivity/source/drivers/ado/AStatement.cxx b/connectivity/source/drivers/ado/AStatement.cxx
index cf0e8c6886b1..71e9d4d8094b 100644
--- a/connectivity/source/drivers/ado/AStatement.cxx
+++ b/connectivity/source/drivers/ado/AStatement.cxx
@@ -61,7 +61,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection ) : OStatement_BASE(
,m_eLockType(adLockReadOnly)
,m_eCursorType(adOpenForwardOnly)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_Command.Create();
if(m_Command.IsValid())
@@ -74,7 +74,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection ) : OStatement_BASE(
m_pConnection->acquire();
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------------------
void OStatement_Base::disposeResultSet()
diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx
index ab7d60f4fcd0..6576fc1a729b 100644
--- a/connectivity/source/drivers/calc/CConnection.cxx
+++ b/connectivity/source/drivers/calc/CConnection.cxx
@@ -108,7 +108,7 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcConnection::acquireDoc" );
if ( m_xDoc.is() )
{
- osl_incrementInterlockedCount(&m_nDocCount);
+ osl_atomic_increment(&m_nDocCount);
return m_xDoc;
}
// open read-only as long as updating isn't implemented
@@ -172,14 +172,14 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc()
) );
::dbtools::throwGenericSQLException( sError, *this, aErrorDetails );
}
- osl_incrementInterlockedCount(&m_nDocCount);
+ osl_atomic_increment(&m_nDocCount);
return m_xDoc;
}
// -----------------------------------------------------------------------------
void OCalcConnection::releaseDoc()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcConnection::releaseDoc" );
- if ( osl_decrementInterlockedCount(&m_nDocCount) == 0 )
+ if ( osl_atomic_decrement(&m_nDocCount) == 0 )
::comphelper::disposeComponent( m_xDoc );
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx
index 5d1140f72673..528508d1da01 100644
--- a/connectivity/source/drivers/evoab2/NConnection.cxx
+++ b/connectivity/source/drivers/evoab2/NConnection.cxx
@@ -95,7 +95,7 @@ IMPLEMENT_SERVICE_INFO(OEvoabConnection, "com.sun.star.sdbc.drivers.evoab.Connec
//-----------------------------------------------------------------------------
void OEvoabConnection::construct(const ::rtl::OUString& url, const Sequence< PropertyValue >& info) throw(SQLException)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
SAL_INFO("evoab2", "OEvoabConnection::construct()::url = " << url );
::rtl::OUString sPassword;
@@ -120,7 +120,7 @@ void OEvoabConnection::construct(const ::rtl::OUString& url, const Sequence< Pro
setSDBCAddressType(SDBCAddress::EVO_LOCAL);
setURL(url);
setPassword(::rtl::OUStringToOString(sPassword,RTL_TEXTENCODING_UTF8));
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// --------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index 2fa26d5b3a95..5f0beab19a8f 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -96,7 +96,7 @@ sal_Bool OConnection::matchesExtension( const String& _rExt ) const
//-----------------------------------------------------------------------------
void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyValue >& info) throw(SQLException)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
::rtl::OUString aExt;
const PropertyValue *pIter = info.getConstArray();
@@ -206,11 +206,11 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
}
catch(const Exception&)
{
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
throw;
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// XServiceInfo
// --------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 43c23e828921..33b9f65f3282 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -116,7 +116,7 @@ OResultSet::OResultSet(OStatement_Base* pStmt,OSQLParseTreeIterator& _aSQLIte
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::OResultSet" );
DBG_CTOR( file_OResultSet, NULL );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_bIsCount = (m_pParseTree &&
m_pParseTree->count() > 2 &&
SQL_ISRULE(m_pParseTree->getChild(2),scalar_exp_commalist) &&
@@ -128,14 +128,14 @@ OResultSet::OResultSet(OStatement_Base* pStmt,OSQLParseTreeIterator& _aSQLIte
m_nResultSetConcurrency = isCount() ? ResultSetConcurrency::READ_ONLY : ResultSetConcurrency::UPDATABLE;
construct();
m_aSkipDeletedSet.SetDeletedVisible(m_bShowDeleted);
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
OResultSet::~OResultSet()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::~OResultSet" );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
disposing();
DBG_DTOR( file_OResultSet, NULL );
}
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index 5667260e73ca..c606bbfe9dfc 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -95,7 +95,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection )
// -----------------------------------------------------------------------------
OStatement_Base::~OStatement_Base()
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
disposing();
delete m_pSQLAnalyzer;
diff --git a/connectivity/source/drivers/flat/EConnection.cxx b/connectivity/source/drivers/flat/EConnection.cxx
index e28a82fa2b19..8122f4cb0e58 100644
--- a/connectivity/source/drivers/flat/EConnection.cxx
+++ b/connectivity/source/drivers/flat/EConnection.cxx
@@ -61,7 +61,7 @@ IMPLEMENT_SERVICE_INFO(OFlatConnection, "com.sun.star.sdbc.drivers.flat.Connecti
//-----------------------------------------------------------------------------
void OFlatConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyValue >& info) throw(SQLException)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
const PropertyValue *pBegin = info.getConstArray();
const PropertyValue *pEnd = pBegin + info.getLength();
@@ -99,7 +99,7 @@ void OFlatConnection::construct(const ::rtl::OUString& url,const Sequence< Prope
}
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
OConnection::construct(url,info);
m_bShowDeleted = sal_True; // we do not supported rows for this type
}
diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx
index 685db4c6f1a4..2d447af76467 100644
--- a/connectivity/source/drivers/hsqldb/HConnection.cxx
+++ b/connectivity/source/drivers/hsqldb/HConnection.cxx
@@ -133,7 +133,7 @@ namespace connectivity { namespace hsqldb
{
if ( !OHsqlConnection_BASE::rBHelper.bDisposed )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/connectivity/source/drivers/jdbc/ConnectionLog.cxx b/connectivity/source/drivers/jdbc/ConnectionLog.cxx
index 2a43f9bef2e0..4afc43a21a21 100644
--- a/connectivity/source/drivers/jdbc/ConnectionLog.cxx
+++ b/connectivity/source/drivers/jdbc/ConnectionLog.cxx
@@ -41,7 +41,7 @@ namespace connectivity { namespace java { namespace sql {
sal_Int32 lcl_getFreeID( ConnectionLog::ObjectType _eType )
{
static oslInterlockedCount s_nCounts[ ConnectionLog::ObjectTypeCount ] = { 0, 0 };
- return osl_incrementInterlockedCount( s_nCounts + _eType );
+ return osl_atomic_increment( s_nCounts + _eType );
}
}
diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx
index 4d0bdc98fab0..5f1093a3691f 100644
--- a/connectivity/source/drivers/jdbc/Object.cxx
+++ b/connectivity/source/drivers/jdbc/Object.cxx
@@ -79,12 +79,12 @@ oslInterlockedCount& getJavaVMRefCount()
// -----------------------------------------------------------------------------
void SDBThreadAttach::addRef()
{
- osl_incrementInterlockedCount(&getJavaVMRefCount());
+ osl_atomic_increment(&getJavaVMRefCount());
}
// -----------------------------------------------------------------------------
void SDBThreadAttach::releaseRef()
{
- osl_decrementInterlockedCount(&getJavaVMRefCount());
+ osl_atomic_decrement(&getJavaVMRefCount());
if ( getJavaVMRefCount() == 0 )
{
getJavaVM2(::rtl::Reference< jvmaccess::VirtualMachine >(),sal_True);
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx
index 160edcda3960..035b3306e219 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -72,11 +72,11 @@ java_sql_ResultSet::java_sql_ResultSet( JNIEnv * pEnv, jobject myObj, const java
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::java_sql_ResultSet" );
SDBThreadAttach::addRef();
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
if ( pStmt )
m_xStatement = *pStmt;
- osl_decrementInterlockedCount(&m_refCount);
+ osl_atomic_decrement(&m_refCount);
}
// -----------------------------------------------------------------------------
java_sql_ResultSet::~java_sql_ResultSet()
@@ -84,7 +84,7 @@ java_sql_ResultSet::~java_sql_ResultSet()
if ( !java_sql_ResultSet_BASE::rBHelper.bDisposed && !java_sql_ResultSet_BASE::rBHelper.bInDispose )
{
// increment ref count to prevent double call of Dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/connectivity/source/drivers/kab/KConnection.cxx b/connectivity/source/drivers/kab/KConnection.cxx
index 95e66426aa34..ffabd1e1c42c 100644
--- a/connectivity/source/drivers/kab/KConnection.cxx
+++ b/connectivity/source/drivers/kab/KConnection.cxx
@@ -63,7 +63,7 @@ void SAL_CALL KabConnection::release() throw()
// -----------------------------------------------------------------------------
void KabConnection::construct(const ::rtl::OUString&, const Sequence< PropertyValue >&) throw(SQLException)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
// create a KDE address book object
m_pAddressBook = KABC::StdAddressBook::self();
@@ -71,7 +71,7 @@ void KabConnection::construct(const ::rtl::OUString&, const Sequence< PropertyVa
// perharps we should analyze the URL to know whether the addressbook is local, over LDAP, etc...
// perharps we should get some user and password information from "info" properties
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// XServiceInfo
// --------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
index 7283b9854e4a..304ef30d0833 100644
--- a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
@@ -40,9 +40,9 @@ KabDatabaseMetaData::KabDatabaseMetaData(KabConnection* _pCon)
{
OSL_ENSURE(_pCon,"KabDatabaseMetaData::KabDatabaseMetaData: No connection set!");
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable());
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
KabDatabaseMetaData::~KabDatabaseMetaData()
diff --git a/connectivity/source/drivers/kab/KDriver.cxx b/connectivity/source/drivers/kab/KDriver.cxx
index 88c3702a3aef..04ee1195631d 100644
--- a/connectivity/source/drivers/kab/KDriver.cxx
+++ b/connectivity/source/drivers/kab/KDriver.cxx
@@ -311,7 +311,7 @@ KabDriver::KabDriver(
if ( !m_xMSFactory.is() )
throw NullPointerException();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
try
{
Reference< XDesktop > xDesktop(
@@ -323,7 +323,7 @@ KabDriver::KabDriver(
{
DBG_UNHANDLED_EXCEPTION();
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// --------------------------------------------------------------------------------
void KabDriver::disposing()
diff --git a/connectivity/source/drivers/macab/MacabConnection.cxx b/connectivity/source/drivers/macab/MacabConnection.cxx
index f546d26c1135..5b4db40ff89d 100644
--- a/connectivity/source/drivers/macab/MacabConnection.cxx
+++ b/connectivity/source/drivers/macab/MacabConnection.cxx
@@ -61,12 +61,12 @@ void SAL_CALL MacabConnection::release() throw()
// -----------------------------------------------------------------------------
void MacabConnection::construct(const ::rtl::OUString&, const Sequence< PropertyValue >&) throw(SQLException)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
// get the Mac OS X shared address book
m_pAddressBook = new MacabAddressBook();
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// XServiceInfo
// --------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
index 994f67db33ed..7ce636312732 100644
--- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
@@ -45,9 +45,9 @@ MacabDatabaseMetaData::MacabDatabaseMetaData(MacabConnection* _pCon)
{
OSL_ENSURE(_pCon,"MacabDatabaseMetaData::MacabDatabaseMetaData: No connection set!");
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable());
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
MacabDatabaseMetaData::~MacabDatabaseMetaData()
diff --git a/connectivity/source/drivers/macab/MacabDriver.cxx b/connectivity/source/drivers/macab/MacabDriver.cxx
index 9c318ad2c128..be82f62549f3 100644
--- a/connectivity/source/drivers/macab/MacabDriver.cxx
+++ b/connectivity/source/drivers/macab/MacabDriver.cxx
@@ -180,7 +180,7 @@ MacabDriver::MacabDriver(
if ( !m_xMSFactory.is() )
throw NullPointerException();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
try
{
Reference< XDesktop > xDesktop(
@@ -192,7 +192,7 @@ MacabDriver::MacabDriver(
{
DBG_UNHANDLED_EXCEPTION();
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// --------------------------------------------------------------------------------
void MacabDriver::disposing()
diff --git a/connectivity/source/drivers/mork/MCatalog.cxx b/connectivity/source/drivers/mork/MCatalog.cxx
index 005037c13adc..87edf95eac10 100644
--- a/connectivity/source/drivers/mork/MCatalog.cxx
+++ b/connectivity/source/drivers/mork/MCatalog.cxx
@@ -39,12 +39,12 @@ OCatalog::OCatalog(OConnection* _pCon) : connectivity::sdbcx::OCatalog(_pCon)
,m_pConnection(_pCon)
,m_xMetaData(m_pConnection->getMetaData( ))
{
-// osl_incrementInterlockedCount( &m_refCount );
+// osl_atomic_increment( &m_refCount );
// refreshTables();
// refreshViews();
// refreshGroups();
// refreshUsers();
-// osl_decrementInterlockedCount( &m_refCount );
+// osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
void OCatalog::refreshTables()
diff --git a/connectivity/source/drivers/mozab/MCatalog.cxx b/connectivity/source/drivers/mozab/MCatalog.cxx
index 1b0c05a17fed..c08bae179398 100644
--- a/connectivity/source/drivers/mozab/MCatalog.cxx
+++ b/connectivity/source/drivers/mozab/MCatalog.cxx
@@ -39,12 +39,12 @@ OCatalog::OCatalog(OConnection* _pCon) : connectivity::sdbcx::OCatalog(_pCon)
,m_pConnection(_pCon)
,m_xMetaData(m_pConnection->getMetaData( ))
{
-// osl_incrementInterlockedCount( &m_refCount );
+// osl_atomic_increment( &m_refCount );
// refreshTables();
// refreshViews();
// refreshGroups();
// refreshUsers();
-// osl_decrementInterlockedCount( &m_refCount );
+// osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
void OCatalog::refreshTables()
diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx
index fd4b5b1c237d..45d891fa3a5b 100644
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx
@@ -46,7 +46,7 @@ ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle,OConnection* _pCon
OSL_ENSURE(m_pConnection,"ODatabaseMetaData::ODatabaseMetaData: No connection set!");
if(!m_pConnection->isCatalogUsed())
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
try
{
m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable());
@@ -56,7 +56,7 @@ ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle,OConnection* _pCon
catch(SQLException& )
{ // doesn't matter here
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
index 37040d4372a2..c8e4156e7cd7 100644
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
@@ -71,10 +71,10 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet(OConnection* _pConnection
if( SQL_NULL_HANDLE == m_aStatementHandle )
throw RuntimeException();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_pConnection->acquire();
m_pRowStatusArray = new SQLUSMALLINT[1]; // the default value
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
// allocBuffer();
}
@@ -84,7 +84,7 @@ ODatabaseMetaDataResultSet::~ODatabaseMetaDataResultSet()
OSL_ENSURE(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed,"Object wasn't disposed!");
if(!ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
delete [] m_pRowStatusArray;
diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx
index ccb45e5ebf52..7cfebcb23f4d 100644
--- a/connectivity/source/drivers/odbcbase/OResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx
@@ -105,7 +105,7 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) :
,m_bRowDeleted(sal_False)
,m_bUseFetchScroll(sal_False)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
try
{
m_pRowStatusArray = new SQLUSMALLINT[1]; // the default value
@@ -149,7 +149,7 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) :
m_bUseFetchScroll = sal_False;
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
OResultSet::~OResultSet()
@@ -160,9 +160,9 @@ OResultSet::~OResultSet()
// -----------------------------------------------------------------------------
void OResultSet::construct()
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
allocBuffer();
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -------------------------------------------------------------------------
void OResultSet::disposing(void)
diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx b/connectivity/source/drivers/odbcbase/OStatement.cxx
index ce92dee3fc0f..fabc0f26e7ef 100644
--- a/connectivity/source/drivers/odbcbase/OStatement.cxx
+++ b/connectivity/source/drivers/odbcbase/OStatement.cxx
@@ -66,7 +66,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection )
,m_pRowStatusArray(0)
,rBHelper(OStatement_BASE::rBHelper)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_pConnection->acquire();
m_aStatementHandle = m_pConnection->createStatementHandle();
@@ -80,7 +80,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection )
// If we ever again encounter a ODBC driver which needs this option, then we should introduce a data source
// setting for it, instead of unconditionally doing it.
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
OStatement_Base::~OStatement_Base()
diff --git a/connectivity/source/resource/sharedresources.cxx b/connectivity/source/resource/sharedresources.cxx
index 1fc4a66f5272..246591063547 100644
--- a/connectivity/source/resource/sharedresources.cxx
+++ b/connectivity/source/resource/sharedresources.cxx
@@ -110,14 +110,14 @@ namespace connectivity
//--------------------------------------------------------------------
void SharedResources_Impl::registerClient()
{
- osl_incrementInterlockedCount( &s_nClients );
+ osl_atomic_increment( &s_nClients );
}
//--------------------------------------------------------------------
void SharedResources_Impl::revokeClient()
{
::osl::MutexGuard aGuard( getMutex() );
- if ( 0 == osl_decrementInterlockedCount( &s_nClients ) )
+ if ( 0 == osl_atomic_decrement( &s_nClients ) )
{
delete s_pInstance;
s_pInstance = NULL;
diff --git a/connectivity/source/simpledbt/refbase.cxx b/connectivity/source/simpledbt/refbase.cxx
index 9af0ada8f2f7..7c9fe5e6b550 100644
--- a/connectivity/source/simpledbt/refbase.cxx
+++ b/connectivity/source/simpledbt/refbase.cxx
@@ -35,13 +35,13 @@ namespace connectivity
//----------------------------------------------------------------
oslInterlockedCount SAL_CALL ORefBase::acquire()
{
- return osl_incrementInterlockedCount(&m_refCount);
+ return osl_atomic_increment(&m_refCount);
}
//----------------------------------------------------------------
oslInterlockedCount SAL_CALL ORefBase::release()
{
- oslInterlockedCount nNewRefCount = osl_decrementInterlockedCount(&m_refCount);
+ oslInterlockedCount nNewRefCount = osl_atomic_decrement(&m_refCount);
if (0 == nNewRefCount)
delete this;
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index c2e4959527bd..e8bc7740cd2b 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -216,7 +216,7 @@ ORowSet::~ORowSet()
if ( !m_rBHelper.bDisposed && !m_rBHelper.bInDispose )
{
OSL_FAIL("Please check who doesn't dispose this component!");
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/dbaccess/source/core/api/RowSetRow.hxx b/dbaccess/source/core/api/RowSetRow.hxx
index e36657e673c4..80a2dacd1edc 100644
--- a/dbaccess/source/core/api/RowSetRow.hxx
+++ b/dbaccess/source/core/api/RowSetRow.hxx
@@ -46,11 +46,11 @@ namespace dbaccess
void acquire()
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
}
void release()
{
- if (! osl_decrementInterlockedCount( &m_refCount ))
+ if (! osl_atomic_decrement( &m_refCount ))
delete this;
}
inline ORowSetRow getRow() const { return m_aRow; }
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx
index 1c378dfc160d..190da6017ae4 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -210,11 +210,11 @@ OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, co
}
// determine the table column we're based on
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_xOriginalTableColumn = impl_determineOriginalTableColumn( _rxConnection );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
OQueryColumn::~OQueryColumn()
@@ -568,7 +568,7 @@ OTableColumnWrapper::OTableColumnWrapper( const Reference< XPropertySet >& rCol,
const bool _bPureWrap )
:OTableColumnDescriptorWrapper( rCol, _bPureWrap, false )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
if ( _xColDefintion.is() )
{
try
@@ -580,7 +580,7 @@ OTableColumnWrapper::OTableColumnWrapper( const Reference< XPropertySet >& rCol,
DBG_UNHANDLED_EXCEPTION();
}
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
OTableColumnWrapper::~OTableColumnWrapper()
diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx
index 8ace09dd2f77..e89d80eae03a 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -88,7 +88,7 @@ OQuery::OQuery( const Reference< XPropertySet >& _rxCommandDefinition
registerProperties();
ODataSettings::registerPropertiesFor(this);
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
OSL_ENSURE(m_xCommandDefinition.is(), "OQuery::OQuery : invalid CommandDefinition object !");
if ( m_xCommandDefinition.is() )
{
@@ -106,7 +106,7 @@ OQuery::OQuery( const Reference< XPropertySet >& _rxCommandDefinition
m_xCommandPropInfo = m_xCommandDefinition->getPropertySetInfo();
}
OSL_ENSURE(m_xConnection.is(), "OQuery::OQuery : invalid connection !");
- osl_decrementInterlockedCount(&m_refCount);
+ osl_atomic_decrement(&m_refCount);
}
OQuery::~OQuery()
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index bc4f690f84b3..66745a51e202 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1015,12 +1015,12 @@ Reference< XModel > ODatabaseModelImpl::createNewModel_deliverOwnership( bool _b
oslInterlockedCount SAL_CALL ODatabaseModelImpl::acquire()
{
- return osl_incrementInterlockedCount(&m_refCount);
+ return osl_atomic_increment(&m_refCount);
}
oslInterlockedCount SAL_CALL ODatabaseModelImpl::release()
{
- if ( osl_decrementInterlockedCount(&m_refCount) == 0 )
+ if ( osl_atomic_decrement(&m_refCount) == 0 )
{
acquire(); // prevent multiple releases
m_pDBContext->removeFromTerminateListener(*this);
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index 44a4299f8656..8e5d5c48e2d2 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -301,7 +301,7 @@ OConnection::OConnection(ODatabaseSource& _rDB
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::OConnection" );
DBG_CTOR(OConnection,NULL);
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
try
{
@@ -377,7 +377,7 @@ OConnection::OConnection(ODatabaseSource& _rDB
{
DBG_UNHANDLED_EXCEPTION();
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
OConnection::~OConnection()
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index bb37110ae416..4d8f3babc9a8 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -178,14 +178,14 @@ ODatabaseContext::ODatabaseContext( const Reference< XComponentContext >& _rxCon
::basic::BasicManagerRepository::registerCreationListener( *this );
#endif
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_xDBRegistrationAggregate.set( createDataSourceRegistrations( m_aContext ), UNO_SET_THROW );
m_xDatabaseRegistrations.set( m_xDBRegistrationAggregate, UNO_QUERY_THROW );
m_xDBRegistrationAggregate->setDelegator( *this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
ODatabaseContext::~ODatabaseContext()
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index e2c4c03d06aa..9b49dc4c62ba 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -174,7 +174,7 @@ ODatabaseDocument::ODatabaseDocument(const ::rtl::Reference<ODatabaseModelImpl>&
DBG_CTOR(ODatabaseDocument,NULL);
OSL_TRACE( "DD: ctor: %p: %p", this, m_pImpl.get() );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
impl_reparent_nothrow( m_xForms );
impl_reparent_nothrow( m_xReports );
@@ -183,7 +183,7 @@ ODatabaseDocument::ODatabaseDocument(const ::rtl::Reference<ODatabaseModelImpl>&
m_pEventExecutor = new DocumentEventExecutor( m_pImpl->m_aContext, this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
// if there previously was a document instance for the same Impl which was already initialized,
// then consider ourself initialized, too.
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index df2153e69006..061d873ef0a7 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -141,12 +141,12 @@ FlushNotificationAdapter::FlushNotificationAdapter( const Reference< XFlushable
DBG_CTOR( FlushNotificationAdapter, NULL );
OSL_ENSURE( _rxBroadcaster.is(), "FlushNotificationAdapter::FlushNotificationAdapter: invalid flushable!" );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
if ( _rxBroadcaster.is() )
_rxBroadcaster->addFlushListener( this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
OSL_ENSURE( m_refCount == 1, "FlushNotificationAdapter::FlushNotificationAdapter: broadcaster isn't holding by hard ref!?" );
}
@@ -341,7 +341,7 @@ void SAL_CALL OSharedConnectionManager::disposing( const ::com::sun::star::lang:
TSharedConnectionMap::iterator aFind = m_aSharedConnection.find(xConnection);
if ( m_aSharedConnection.end() != aFind )
{
- osl_decrementInterlockedCount(&aFind->second->second.nALiveCount);
+ osl_atomic_decrement(&aFind->second->second.nALiveCount);
if ( !aFind->second->second.nALiveCount )
{
::comphelper::disposeComponent(aFind->second->second.xMasterConnection);
@@ -404,7 +404,7 @@ void OSharedConnectionManager::addEventListener(const Reference<XConnection>& _r
Reference<XComponent> xComp(_rxConnection,UNO_QUERY);
xComp->addEventListener(this);
OSL_ENSURE( m_aConnections.end() != _rIter , "Iterator is end!");
- osl_incrementInterlockedCount(&_rIter->second.nALiveCount);
+ osl_atomic_increment(&_rIter->second.nALiveCount);
}
namespace
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 1f39d32ccb21..4593269de978 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -183,12 +183,12 @@ namespace dbaccess
,m_bInStateChange(false)
,m_bInChangingState(false)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
if ( m_xBroadCaster.is() )
m_xBroadCaster->addStateChangeListener(this);
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
virtual void SAL_CALL changingState( const lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (embed::WrongStateException, uno::RuntimeException);
@@ -329,11 +329,11 @@ namespace dbaccess
:m_xClient( _rxClient )
{
OSL_ENSURE( _rxActor.is(), "LifetimeCoupler::LifetimeCoupler: this will crash!" );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
_rxActor->addEventListener( this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
OSL_ENSURE( m_refCount, "LifetimeCoupler::LifetimeCoupler: the actor is not holding us by hard ref - this won't work!" );
}
diff --git a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
index 7d41a9ebd38a..0d835a0b206f 100644
--- a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
+++ b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
@@ -128,11 +128,11 @@ namespace dbaccess
{
Reference< XDocumentEventBroadcaster > xBroadcaster( _rxDocument, UNO_QUERY_THROW );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
xBroadcaster->addDocumentEventListener( this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
try
{
diff --git a/dbaccess/source/core/dataaccess/documenteventnotifier.cxx b/dbaccess/source/core/dataaccess/documenteventnotifier.cxx
index bfa12a539730..1bd422905b22 100644
--- a/dbaccess/source/core/dataaccess/documenteventnotifier.cxx
+++ b/dbaccess/source/core/dataaccess/documenteventnotifier.cxx
@@ -137,12 +137,12 @@ namespace dbaccess
void SAL_CALL DocumentEventNotifier_Impl::acquire()
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
}
void SAL_CALL DocumentEventNotifier_Impl::release()
{
- if ( 0 == osl_decrementInterlockedCount( &m_refCount ) )
+ if ( 0 == osl_atomic_decrement( &m_refCount ) )
delete this;
}
diff --git a/dbaccess/source/core/inc/FilteredContainer.hxx b/dbaccess/source/core/inc/FilteredContainer.hxx
index c1b525ed8d10..049bdbc15103 100644
--- a/dbaccess/source/core/inc/FilteredContainer.hxx
+++ b/dbaccess/source/core/inc/FilteredContainer.hxx
@@ -72,12 +72,12 @@ namespace dbaccess
EnsureReset( oslInterlockedCount& _rValueLocation)
:m_rValue( _rValueLocation )
{
- osl_incrementInterlockedCount(&m_rValue);
+ osl_atomic_increment(&m_rValue);
}
~EnsureReset()
{
- osl_decrementInterlockedCount(&m_rValue);
+ osl_atomic_decrement(&m_rValue);
}
private:
diff --git a/dbaccess/source/core/misc/ContainerMediator.cxx b/dbaccess/source/core/misc/ContainerMediator.cxx
index bd153d5b7340..de4dfa5bc710 100644
--- a/dbaccess/source/core/misc/ContainerMediator.cxx
+++ b/dbaccess/source/core/misc/ContainerMediator.cxx
@@ -53,7 +53,7 @@ OContainerMediator::OContainerMediator( const Reference< XContainer >& _xContain
if ( _xSettings.is() && _xContainer.is() )
{
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
try
{
m_xContainer->addContainerListener(this);
@@ -65,7 +65,7 @@ OContainerMediator::OContainerMediator( const Reference< XContainer >& _xContain
{
OSL_FAIL("OContainerMediator::OContainerMediator: caught an exception!");
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
else
{
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index 64eeb96267de..80bb59906a0e 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -70,7 +70,7 @@ DatabaseDataProvider::DatabaseDataProvider(uno::Reference< uno::XComponentContex
m_xRangeConversion.set(m_xInternal,uno::UNO_QUERY);
m_xComplexDescriptionAccess.set(m_xInternal,uno::UNO_QUERY);
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_xRowSet.set( m_xContext->getServiceManager()->createInstanceWithContext(SERVICE_SDB_ROWSET,m_xContext ), uno::UNO_QUERY );
m_xAggregate.set(m_xRowSet,uno::UNO_QUERY);
@@ -81,7 +81,7 @@ DatabaseDataProvider::DatabaseDataProvider(uno::Reference< uno::XComponentContex
m_xAggregateSet->setPropertyValue(PROPERTY_COMMAND_TYPE,uno::makeAny(m_CommandType));
m_xAggregateSet->setPropertyValue(PROPERTY_ESCAPE_PROCESSING,uno::makeAny(m_EscapeProcessing));
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
void SAL_CALL DatabaseDataProvider::disposing()
diff --git a/dbaccess/source/core/misc/PropertyForward.cxx b/dbaccess/source/core/misc/PropertyForward.cxx
index 428942fc1458..2894a7fe73e8 100644
--- a/dbaccess/source/core/misc/PropertyForward.cxx
+++ b/dbaccess/source/core/misc/PropertyForward.cxx
@@ -53,7 +53,7 @@ namespace dbaccess
{
DBG_CTOR(OPropertyForward,NULL);
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
try
{
if ( _aPropertyList.empty() )
@@ -70,7 +70,7 @@ namespace dbaccess
{
DBG_UNHANDLED_EXCEPTION();
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/core/misc/apitools.cxx b/dbaccess/source/core/misc/apitools.cxx
index fa6781066c39..cdf690b37895 100644
--- a/dbaccess/source/core/misc/apitools.cxx
+++ b/dbaccess/source/core/misc/apitools.cxx
@@ -78,7 +78,7 @@ void OSubComponent::release() throw ( )
Reference< XInterface > x( xDelegator );
if (! x.is())
{
- if (osl_decrementInterlockedCount( &m_refCount ) == 0 )
+ if (osl_atomic_decrement( &m_refCount ) == 0 )
{
if (! rBHelper.bDisposed)
{
@@ -115,7 +115,7 @@ void OSubComponent::release() throw ( )
}
}
// restore the reference count
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
}
// as we cover the job of the componenthelper we use the ...
diff --git a/dbaccess/source/core/recovery/settingsimport.cxx b/dbaccess/source/core/recovery/settingsimport.cxx
index 0f92f496012a..614c268d4b86 100644
--- a/dbaccess/source/core/recovery/settingsimport.cxx
+++ b/dbaccess/source/core/recovery/settingsimport.cxx
@@ -60,13 +60,13 @@ namespace dbaccess
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL SettingsImport::acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL SettingsImport::release()
{
- oslInterlockedCount newCount = osl_decrementInterlockedCount( &m_refCount );
+ oslInterlockedCount newCount = osl_atomic_decrement( &m_refCount );
if ( newCount == 0 )
delete this;
return newCount;
diff --git a/dbaccess/source/core/recovery/subcomponentloader.cxx b/dbaccess/source/core/recovery/subcomponentloader.cxx
index 5e3e86785b45..7238b39930e8 100644
--- a/dbaccess/source/core/recovery/subcomponentloader.cxx
+++ b/dbaccess/source/core/recovery/subcomponentloader.cxx
@@ -120,11 +120,11 @@ namespace dbaccess
Reference< XController2 > xController( i_rApplicationController, UNO_QUERY_THROW );
m_pData->xAppComponentWindow.set( xController->getComponentWindow(), UNO_SET_THROW );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_pData->xAppComponentWindow->addWindowListener( this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------
@@ -136,11 +136,11 @@ namespace dbaccess
Reference< XController2 > xController( i_rApplicationController, UNO_QUERY_THROW );
m_pData->xAppComponentWindow.set( xController->getComponentWindow(), UNO_SET_THROW );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_pData->xAppComponentWindow->addWindowListener( this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 9fd4d3a31798..aaa71c380db0 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -320,7 +320,7 @@ OApplicationController::~OApplicationController()
{
OSL_FAIL("Please check who doesn't dispose this component!");
// increment ref count to prevent double call of Dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
SAL_WNODEPRECATED_DECLARATIONS_PUSH
diff --git a/dbaccess/source/ui/browser/dbexchange.cxx b/dbaccess/source/ui/browser/dbexchange.cxx
index 39502a4b72ea..fa2abaa9906d 100644
--- a/dbaccess/source/ui/browser/dbexchange.cxx
+++ b/dbaccess/source/ui/browser/dbexchange.cxx
@@ -71,13 +71,13 @@ namespace dbaui
,m_pHtml(NULL)
,m_pRtf(NULL)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
lcl_setListener( _rxConnection, this, true );
m_pHtml.set( new OHTMLImportExport( getDescriptor(), _rxORB, _rxFormatter ) );
m_pRtf.set( new ORTFImportExport( getDescriptor(), _rxORB, _rxFormatter ) );
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
@@ -106,7 +106,7 @@ namespace dbaui
{
OSL_PRECOND( i_rORB.is(), "ODataClipboard::ODataClipboard: having no factory is not good ..." );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
Reference<XConnection> xConnection;
getDescriptor()[ daConnection ] >>= xConnection;
@@ -136,7 +136,7 @@ namespace dbaui
}
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index 11178af047ec..cb8d8b947bb2 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -189,11 +189,11 @@ OGenericUnoController::OGenericUnoController(const Reference< XMultiServiceFacto
,m_bCurrentlyModified(sal_False)
,m_bExternalTitle(sal_False)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_pData.reset( new OGenericUnoController_Data( *this, getMutex() ) );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
DBG_CTOR(OGenericUnoController,NULL);
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index e50a64eb990f..0be575a803e7 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -247,7 +247,7 @@ SbaTableQueryBrowser::~SbaTableQueryBrowser()
{
OSL_FAIL("Please check who doesn't dispose this component!");
// increment ref count to prevent double call of Dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx
index cf9242e92598..d768adf0358b 100644
--- a/dbaccess/source/ui/control/toolboxcontroller.cxx
+++ b/dbaccess/source/ui/control/toolboxcontroller.cxx
@@ -71,9 +71,9 @@ namespace dbaui
OToolboxController::OToolboxController(const Reference< XMultiServiceFactory >& _rxORB)
: m_nToolBoxId(1)
{
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
m_xServiceManager = _rxORB;
- osl_decrementInterlockedCount(&m_refCount);
+ osl_atomic_decrement(&m_refCount);
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index ad091cc66c21..36c922cdc180 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -108,7 +108,7 @@ ODatabaseImportExport::ODatabaseImportExport(const ::svx::ODataAccessDescriptor&
m_eDestEnc = osl_getThreadTextEncoding();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
impl_initFromDescriptor( _aDataDescriptor, false );
xub_StrLen nCount = comphelper::string::getTokenCount(rExchange, char(11));
@@ -118,7 +118,7 @@ ODatabaseImportExport::ODatabaseImportExport(const ::svx::ODataAccessDescriptor&
for(xub_StrLen i=SBA_FORMAT_SELECTION_COUNT;i<nCount;++i)
m_pRowMarker[i-SBA_FORMAT_SELECTION_COUNT] = rExchange.GetToken(i,char(11)).ToInt32();
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
// import data
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index eb678236f3ba..7ae234877f80 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -352,7 +352,7 @@ OQueryController::~OQueryController()
{
OSL_FAIL("Please check who doesn't dispose this component!");
// increment ref count to prevent double call of Dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/dbaccess/source/ui/uno/ColumnPeer.cxx b/dbaccess/source/ui/uno/ColumnPeer.cxx
index 4329e16a90a5..c5613a75f767 100644
--- a/dbaccess/source/ui/uno/ColumnPeer.cxx
+++ b/dbaccess/source/ui/uno/ColumnPeer.cxx
@@ -37,13 +37,13 @@ OColumnPeer::OColumnPeer(Window* _pParent,const Reference<XMultiServiceFactory>&
:m_xORB(_rxFactory)
,m_pActFieldDescr(NULL)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
OColumnControlWindow* pFieldControl = new OColumnControlWindow(_pParent,m_xORB);
pFieldControl->SetComponentInterface(this);
pFieldControl->Show();
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
void OColumnPeer::setEditWidth(sal_Int32 _nWidth)
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index 99af4b56ed06..382965de3b43 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -114,14 +114,14 @@ SvxEditEngineSourceImpl::~SvxEditEngineSourceImpl()
void SAL_CALL SvxEditEngineSourceImpl::acquire()
{
- osl_incrementInterlockedCount( &maRefCount );
+ osl_atomic_increment( &maRefCount );
}
//------------------------------------------------------------------------
void SAL_CALL SvxEditEngineSourceImpl::release()
{
- if( ! osl_decrementInterlockedCount( &maRefCount ) )
+ if( ! osl_atomic_decrement( &maRefCount ) )
delete this;
}
diff --git a/embeddedobj/source/msole/advisesink.cxx b/embeddedobj/source/msole/advisesink.cxx
index f15f7fb51555..c8272846b84b 100644
--- a/embeddedobj/source/msole/advisesink.cxx
+++ b/embeddedobj/source/msole/advisesink.cxx
@@ -55,7 +55,7 @@ STDMETHODIMP OleWrapperAdviseSink::QueryInterface( REFIID riid , void** ppv )
STDMETHODIMP_(ULONG) OleWrapperAdviseSink::AddRef()
{
- return osl_incrementInterlockedCount( &m_nRefCount);
+ return osl_atomic_increment( &m_nRefCount);
}
STDMETHODIMP_(ULONG) OleWrapperAdviseSink::Release()
diff --git a/embeddedobj/source/msole/olewrapclient.cxx b/embeddedobj/source/msole/olewrapclient.cxx
index 84ebec9a9dd7..7f14a2629eaa 100644
--- a/embeddedobj/source/msole/olewrapclient.cxx
+++ b/embeddedobj/source/msole/olewrapclient.cxx
@@ -56,7 +56,7 @@ STDMETHODIMP OleWrapperClientSite::QueryInterface( REFIID riid , void** ppv )
STDMETHODIMP_(ULONG) OleWrapperClientSite::AddRef()
{
- return osl_incrementInterlockedCount( &m_nRefCount);
+ return osl_atomic_increment( &m_nRefCount);
}
STDMETHODIMP_(ULONG) OleWrapperClientSite::Release()
diff --git a/embedserv/source/embed/ed_ipersiststr.cxx b/embedserv/source/embed/ed_ipersiststr.cxx
index 92feee5d6356..783ab45138e4 100644
--- a/embedserv/source/embed/ed_ipersiststr.cxx
+++ b/embedserv/source/embed/ed_ipersiststr.cxx
@@ -341,7 +341,7 @@ STDMETHODIMP EmbedDocument_Impl::QueryInterface( REFIID riid, void FAR* FAR* ppv
STDMETHODIMP_(ULONG) EmbedDocument_Impl::AddRef()
{
- return osl_incrementInterlockedCount( &m_refCount);
+ return osl_atomic_increment( &m_refCount);
}
STDMETHODIMP_(ULONG) EmbedDocument_Impl::Release()
@@ -351,7 +351,7 @@ STDMETHODIMP_(ULONG) EmbedDocument_Impl::Release()
if ( m_refCount == 1 )
m_xOwnAccess->ClearEmbedDocument();
- sal_Int32 nCount = osl_decrementInterlockedCount( &m_refCount );
+ sal_Int32 nCount = osl_atomic_decrement( &m_refCount );
if ( nCount == 0 )
delete this;
return nCount;
diff --git a/embedserv/source/embed/iipaobj.cxx b/embedserv/source/embed/iipaobj.cxx
index 41a9469f3e99..bfff766af90e 100644
--- a/embedserv/source/embed/iipaobj.cxx
+++ b/embedserv/source/embed/iipaobj.cxx
@@ -58,12 +58,12 @@ STDMETHODIMP CIIAObj::QueryInterface(REFIID riid, LPVOID FAR *ppv)
STDMETHODIMP_(ULONG) CIIAObj::AddRef(void)
{
- return osl_incrementInterlockedCount( &m_refCount);
+ return osl_atomic_increment( &m_refCount);
}
STDMETHODIMP_(ULONG) CIIAObj::Release(void)
{
- sal_Int32 nCount = osl_decrementInterlockedCount( &m_refCount);
+ sal_Int32 nCount = osl_atomic_decrement( &m_refCount);
if ( nCount == 0 )
delete this;
diff --git a/embedserv/source/embed/servprov.cxx b/embedserv/source/embed/servprov.cxx
index a7c2124ee7bb..e6fb95880007 100644
--- a/embedserv/source/embed/servprov.cxx
+++ b/embedserv/source/embed/servprov.cxx
@@ -258,7 +258,7 @@ STDMETHODIMP EmbedProviderFactory_Impl::QueryInterface(REFIID riid, void FAR* FA
STDMETHODIMP_(ULONG) EmbedProviderFactory_Impl::AddRef()
{
- return osl_incrementInterlockedCount( &m_refCount);
+ return osl_atomic_increment( &m_refCount);
}
STDMETHODIMP_(ULONG) EmbedProviderFactory_Impl::Release()
diff --git a/extensions/source/logging/logger.cxx b/extensions/source/logging/logger.cxx
index e692919c78a2..9bdd202fcbc0 100644
--- a/extensions/source/logging/logger.cxx
+++ b/extensions/source/logging/logger.cxx
@@ -181,11 +181,11 @@ namespace logging
,m_nLogLevel( LogLevel::OFF )
,m_sName( _rName )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
initializeLoggerFromConfiguration( m_aContext, this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------
@@ -267,7 +267,7 @@ namespace logging
m_sName,
_rMessage,
_nLevel,
- osl_incrementInterlockedCount( &m_nEventNumber )
+ osl_atomic_increment( &m_nEventNumber )
) );
}
@@ -280,7 +280,7 @@ namespace logging
_rSourceMethod,
_rMessage,
_nLevel,
- osl_incrementInterlockedCount( &m_nEventNumber )
+ osl_atomic_increment( &m_nEventNumber )
) );
}
diff --git a/extensions/source/ole/servprov.cxx b/extensions/source/ole/servprov.cxx
index cdfb6aafb37b..c133405a0348 100644
--- a/extensions/source/ole/servprov.cxx
+++ b/extensions/source/ole/servprov.cxx
@@ -151,7 +151,7 @@ STDMETHODIMP ProviderOleWrapper_Impl::QueryInterface(REFIID riid, void FAR* FAR*
STDMETHODIMP_(ULONG) ProviderOleWrapper_Impl::AddRef()
{
- return osl_incrementInterlockedCount( &m_refCount);
+ return osl_atomic_increment( &m_refCount);
}
STDMETHODIMP_(ULONG) ProviderOleWrapper_Impl::Release()
@@ -297,7 +297,7 @@ STDMETHODIMP OneInstanceOleWrapper_Impl::QueryInterface(REFIID riid, void FAR* F
STDMETHODIMP_(ULONG) OneInstanceOleWrapper_Impl::AddRef()
{
- return osl_incrementInterlockedCount( &m_refCount);
+ return osl_atomic_increment( &m_refCount);
}
STDMETHODIMP_(ULONG) OneInstanceOleWrapper_Impl::Release()
diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx
index 97782cca32ba..27245af578fc 100644
--- a/extensions/source/ole/unoconversionutilities.hxx
+++ b/extensions/source/ole/unoconversionutilities.hxx
@@ -2076,7 +2076,7 @@ void UnoConversionUtilities<T>::dispatchExObject2Sequence( const VARIANTARG* pva
// just copy the pointer of the uno_Sequence
// nelementSize should be 4 !!!!
memcpy( pDest, &p_unoSeq, nelementSize);
- osl_incrementInterlockedCount( &p_unoSeq->nRefCount);
+ osl_atomic_increment( &p_unoSeq->nRefCount);
}
else // Element type is no Sequence -> do one conversion
{
diff --git a/extensions/source/propctrlr/composeduiupdate.cxx b/extensions/source/propctrlr/composeduiupdate.cxx
index 0512dad4bf82..5104f15fbf65 100644
--- a/extensions/source/propctrlr/composeduiupdate.cxx
+++ b/extensions/source/propctrlr/composeduiupdate.cxx
@@ -232,13 +232,13 @@ namespace pcr
//----------------------------------------------------------------
void SAL_CALL CachedInspectorUI::acquire() throw()
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
}
//----------------------------------------------------------------
void SAL_CALL CachedInspectorUI::release() throw()
{
- if ( 0 == osl_decrementInterlockedCount( &m_refCount ) )
+ if ( 0 == osl_atomic_decrement( &m_refCount ) )
delete this;
}
@@ -789,14 +789,14 @@ namespace pcr
void SAL_CALL ComposedPropertyUIUpdate::suspendAutoFire()
{
impl_checkDisposed();
- osl_incrementInterlockedCount( &m_nSuspendCounter );
+ osl_atomic_increment( &m_nSuspendCounter );
}
//--------------------------------------------------------------------
void SAL_CALL ComposedPropertyUIUpdate::resumeAutoFire()
{
impl_checkDisposed();
- if ( 0 == osl_decrementInterlockedCount( &m_nSuspendCounter ) )
+ if ( 0 == osl_atomic_decrement( &m_nSuspendCounter ) )
impl_fireAll_throw();
}
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 813bd93ce98b..acf8a9ab7ebf 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -3004,12 +3004,12 @@ namespace pcr
virtual oslInterlockedCount SAL_CALL acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
virtual oslInterlockedCount SAL_CALL release()
{
- if ( 0 == osl_decrementInterlockedCount( &m_refCount ) )
+ if ( 0 == osl_atomic_decrement( &m_refCount ) )
{
delete this;
return 0;
diff --git a/extensions/source/propctrlr/formcontroller.cxx b/extensions/source/propctrlr/formcontroller.cxx
index 8956acb854a5..0c7e71063ab5 100644
--- a/extensions/source/propctrlr/formcontroller.cxx
+++ b/extensions/source/propctrlr/formcontroller.cxx
@@ -90,7 +90,7 @@ namespace pcr
,FormController_PropertyBase1( m_aBHelper )
,m_aServiceDescriptor( _aServiceDescriptor )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
Reference< XObjectInspectorModel > xModel(
*(new DefaultFormComponentInspectorModel( _rxContext, _bUseFormFormComponentHandlers )),
@@ -98,7 +98,7 @@ namespace pcr
);
setInspectorModel( xModel );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------------
diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx
index 3a9d88d3bd7c..af89b028d16c 100644
--- a/extensions/source/propctrlr/formgeometryhandler.cxx
+++ b/extensions/source/propctrlr/formgeometryhandler.cxx
@@ -784,7 +784,7 @@ namespace pcr
//--------------------------------------------------------------------
void ShapeGeometryChangeNotifier::impl_init_nothrow()
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
try
{
Reference< XPropertySet > xShapeProperties( m_xShape, UNO_QUERY_THROW );
@@ -794,7 +794,7 @@ namespace pcr
{
DBG_UNHANDLED_EXCEPTION();
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------
diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx
index 8d5cadcacb67..7b96b8d73676 100644
--- a/extensions/source/propctrlr/formmetadata.cxx
+++ b/extensions/source/propctrlr/formmetadata.cxx
@@ -685,13 +685,13 @@ namespace pcr
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL DefaultEnumRepresentation::acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL DefaultEnumRepresentation::release()
{
- if ( 0 == osl_decrementInterlockedCount( &m_refCount ) )
+ if ( 0 == osl_atomic_decrement( &m_refCount ) )
{
delete this;
return 0;
diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx
index 4d19034ce73e..3a06449f0151 100644
--- a/extensions/source/propctrlr/genericpropertyhandler.cxx
+++ b/extensions/source/propctrlr/genericpropertyhandler.cxx
@@ -202,13 +202,13 @@ namespace pcr
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL EnumRepresentation::acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL EnumRepresentation::release()
{
- if ( 0 == osl_decrementInterlockedCount( &m_refCount ) )
+ if ( 0 == osl_atomic_decrement( &m_refCount ) )
{
delete this;
return 0;
@@ -249,11 +249,11 @@ namespace pcr
if ( !_rxControl.is() )
throw NullPointerException();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
_rxControl->addActionListener( this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
OSL_ENSURE( m_refCount > 0, "UrlClickHandler::UrlClickHandler: leaking!" );
DBG_CTOR( UrlClickHandler, NULL );
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index ecc18697fb23..aaa95754be90 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -355,11 +355,11 @@ namespace pcr
//------------------------------------------------------------------------
void OPropertyBrowserController::createWithModel( const Reference< XObjectInspectorModel >& _rxModel )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
setInspectorModel( _rxModel );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
m_bConstructed = true;
}
diff --git a/extensions/source/propctrlr/propertycomposer.cxx b/extensions/source/propctrlr/propertycomposer.cxx
index 1d6aea4574c0..3869dbd2a9aa 100644
--- a/extensions/source/propctrlr/propertycomposer.cxx
+++ b/extensions/source/propctrlr/propertycomposer.cxx
@@ -100,7 +100,7 @@ namespace pcr
if ( m_aSlaveHandlers.empty() )
throw IllegalArgumentException();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
Reference< XPropertyChangeListener > xMeMyselfAndI( this );
for ( HandlerArray::const_iterator loop = m_aSlaveHandlers.begin();
@@ -113,7 +113,7 @@ namespace pcr
(*loop)->addPropertyChangeListener( xMeMyselfAndI );
}
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------
diff --git a/extensions/source/propctrlr/sqlcommanddesign.cxx b/extensions/source/propctrlr/sqlcommanddesign.cxx
index 96d164c50953..c6405ea43631 100644
--- a/extensions/source/propctrlr/sqlcommanddesign.cxx
+++ b/extensions/source/propctrlr/sqlcommanddesign.cxx
@@ -222,7 +222,7 @@ namespace pcr
OSL_PRECOND( !isActive(),
"SQLCommandDesigner::impl_doOpenDesignerFrame_nothrow: already active!" );
OSL_PRECOND( m_xConnection.is(), "SQLCommandDesigner::impl_doOpenDesignerFrame_nothrow: this will crash!" );
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
try
{
@@ -279,7 +279,7 @@ namespace pcr
DBG_UNHANDLED_EXCEPTION();
m_xDesigner.clear();
}
- osl_decrementInterlockedCount(&m_refCount);
+ osl_atomic_decrement(&m_refCount);
}
//------------------------------------------------------------------------
diff --git a/extensions/source/propctrlr/xsddatatypes.cxx b/extensions/source/propctrlr/xsddatatypes.cxx
index 547abdbf948a..e7e82310c9cd 100644
--- a/extensions/source/propctrlr/xsddatatypes.cxx
+++ b/extensions/source/propctrlr/xsddatatypes.cxx
@@ -107,13 +107,13 @@ namespace pcr
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL XSDDataType::acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL XSDDataType::release()
{
- if ( 0 == osl_decrementInterlockedCount( &m_refCount ) )
+ if ( 0 == osl_atomic_decrement( &m_refCount ) )
{
delete this;
return 0;
diff --git a/filter/source/config/cache/lateinitlistener.cxx b/filter/source/config/cache/lateinitlistener.cxx
index 78bb3ec92104..21c4c808efa4 100644
--- a/filter/source/config/cache/lateinitlistener.cxx
+++ b/filter/source/config/cache/lateinitlistener.cxx
@@ -50,7 +50,7 @@ LateInitListener::LateInitListener(const css::uno::Reference< css::lang::XMultiS
// important to do so ...
// Otherwise the temp. reference to ourselves
// will kill us at releasing time!
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_xBroadcaster = css::uno::Reference< css::document::XEventBroadcaster >(
m_xSMGR->createInstance(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.GlobalEventBroadcaster" ))),
@@ -58,7 +58,7 @@ LateInitListener::LateInitListener(const css::uno::Reference< css::lang::XMultiS
m_xBroadcaster->addEventListener(static_cast< css::document::XEventListener* >(this));
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index d73487cd883d..7938066b0d30 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -370,7 +370,7 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource )
impl_construct();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
// our aggregated rowset itself is not cloneable, so simply copy the properties
::comphelper::copyProperties( _cloneSource.m_xAggregateSet, m_xAggregateSet );
@@ -419,7 +419,7 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource )
);
}
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------
@@ -1480,9 +1480,9 @@ void SAL_CALL ODatabaseForm::clearWarnings( ) throw (SQLException, RuntimeExcep
Reference< XCloneable > SAL_CALL ODatabaseForm::createClone( ) throw (RuntimeException)
{
ODatabaseForm* pClone = new ODatabaseForm( *this );
- osl_incrementInterlockedCount( &pClone->m_refCount );
+ osl_atomic_increment( &pClone->m_refCount );
pClone->clonedFrom( *this );
- osl_decrementInterlockedCount( &pClone->m_refCount );
+ osl_atomic_decrement( &pClone->m_refCount );
return pClone;
}
diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx
index bdbaefa2148a..17460767631b 100644
--- a/forms/source/component/Date.cxx
+++ b/forms/source/component/Date.cxx
@@ -109,7 +109,7 @@ ODateModel::ODateModel(const Reference<XMultiServiceFactory>& _rxFactory)
setAggregateSet(m_xAggregateFastSet, getOriginalHandle(PROPERTY_ID_DATEFORMAT));
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
try
{
if ( m_xAggregateSet.is() )
@@ -119,7 +119,7 @@ ODateModel::ODateModel(const Reference<XMultiServiceFactory>& _rxFactory)
{
OSL_FAIL( "ODateModel::ODateModel: caught an exception!" );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------------------
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 27600cfe8cbc..588e369a0fd6 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -1184,14 +1184,14 @@ void SAL_CALL OControlModel::setPropertyValues( const Sequence< PropertyValue >&
void OControlModel::lockInstance( LockAccess )
{
m_aMutex.acquire();
- osl_incrementInterlockedCount( &m_lockCount );
+ osl_atomic_increment( &m_lockCount );
}
//--------------------------------------------------------------------
oslInterlockedCount OControlModel::unlockInstance( LockAccess )
{
OSL_ENSURE( m_lockCount > 0, "OControlModel::unlockInstance: not locked!" );
- oslInterlockedCount lockCount = osl_decrementInterlockedCount( &m_lockCount );
+ oslInterlockedCount lockCount = osl_atomic_decrement( &m_lockCount );
m_aMutex.release();
return lockCount;
}
diff --git a/forms/source/component/FormattedFieldWrapper.cxx b/forms/source/component/FormattedFieldWrapper.cxx
index 355287d3c3c1..561fa25905d9 100644
--- a/forms/source/component/FormattedFieldWrapper.cxx
+++ b/forms/source/component/FormattedFieldWrapper.cxx
@@ -56,9 +56,9 @@ namespace {
class RefCountGuard: private boost::noncopyable {
public:
explicit RefCountGuard(oslInterlockedCount & count): count_(count)
- { osl_incrementInterlockedCount(&count_); }
+ { osl_atomic_increment(&count_); }
- ~RefCountGuard() { osl_decrementInterlockedCount(&count_); }
+ ~RefCountGuard() { osl_atomic_decrement(&count_); }
private:
oslInterlockedCount & count_;
diff --git a/forms/source/component/FormsCollection.cxx b/forms/source/component/FormsCollection.cxx
index 5329349a9a46..f7bbcdb4d2b8 100644
--- a/forms/source/component/FormsCollection.cxx
+++ b/forms/source/component/FormsCollection.cxx
@@ -147,9 +147,9 @@ StringSequence SAL_CALL OFormsCollection::getSupportedServiceNames() throw(Runti
Reference< XCloneable > SAL_CALL OFormsCollection::createClone( ) throw (RuntimeException)
{
OFormsCollection* pClone = new OFormsCollection( *this );
- osl_incrementInterlockedCount( &pClone->m_refCount );
+ osl_atomic_increment( &pClone->m_refCount );
pClone->clonedFrom( *this );
- osl_decrementInterlockedCount( &pClone->m_refCount );
+ osl_atomic_decrement( &pClone->m_refCount );
return pClone;
}
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index 9c71efbe432c..1ea66a71f30e 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -158,12 +158,12 @@ OGridControlModel::~OGridControlModel()
Reference< XCloneable > SAL_CALL OGridControlModel::createClone( ) throw (RuntimeException)
{
OGridControlModel* pClone = new OGridControlModel( this, getContext().getLegacyServiceFactory() );
- osl_incrementInterlockedCount( &pClone->m_refCount );
+ osl_atomic_increment( &pClone->m_refCount );
pClone->OControlModel::clonedFrom( this );
// do not call OInterfaceContainer::clonedFrom, it would clone the elements aka columns, which is
// already done in the ctor
//pClone->OInterfaceContainer::clonedFrom( *this );
- osl_decrementInterlockedCount( &pClone->m_refCount );
+ osl_atomic_decrement( &pClone->m_refCount );
return static_cast< XCloneable* >( static_cast< OControlModel* >( pClone ) );
}
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index 57a871b1d368..083a3dfaa43a 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -176,13 +176,13 @@ OImageControlModel::OImageControlModel( const OImageControlModel* _pOriginal, co
DBG_CTOR( OImageControlModel, NULL );
implConstruct();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
// simulate a propertyChanged event for the ImageURL
::osl::MutexGuard aGuard( m_aMutex );
impl_handleNewImageURL_lck( eOther );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------
diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx
index 783a13f8d0fb..fbaa686012d4 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -495,14 +495,14 @@ namespace frm
//------------------------------------------------------------------------------
void OClickableImageBaseModel::implInitializeImageURL( )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
// simulate a propertyChanged event for the ImageURL
Any aImageURL;
getFastPropertyValue( aImageURL, PROPERTY_ID_IMAGE_URL );
_propertyChanged( PropertyChangeEvent( *this, PROPERTY_IMAGE_URL, sal_False, PROPERTY_ID_IMAGE_URL, Any( ), aImageURL ) );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------------------
diff --git a/forms/source/helper/windowstateguard.cxx b/forms/source/helper/windowstateguard.cxx
index a06f16ee0817..a7d251f353ca 100644
--- a/forms/source/helper/windowstateguard.cxx
+++ b/forms/source/helper/windowstateguard.cxx
@@ -106,11 +106,11 @@ namespace frm
if ( !m_xWindow.is() || !m_xModelProps.is() )
throw RuntimeException();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_xWindow->addWindowListener( this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------
diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx
index c390aab52a48..469a3f3e8dd5 100644
--- a/forms/source/richtext/rtattributehandler.cxx
+++ b/forms/source/richtext/rtattributehandler.cxx
@@ -60,13 +60,13 @@ namespace frm
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL ReferenceBase::acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL ReferenceBase::release()
{
- return osl_decrementInterlockedCount( &m_refCount );
+ return osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------
diff --git a/fpicker/source/office/asyncfilepicker.cxx b/fpicker/source/office/asyncfilepicker.cxx
index 3e1255ceabc0..1e204a1e5275 100644
--- a/fpicker/source/office/asyncfilepicker.cxx
+++ b/fpicker/source/office/asyncfilepicker.cxx
@@ -56,13 +56,13 @@ namespace svt
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL AsyncPickerAction::acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL AsyncPickerAction::release()
{
- if ( 0 == osl_decrementInterlockedCount( &m_refCount ) )
+ if ( 0 == osl_atomic_decrement( &m_refCount ) )
{
delete this;
return 0;
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
index 4fe1926074b3..988b7fd1f942 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
@@ -89,7 +89,7 @@ HRESULT STDMETHODCALLTYPE VistaFilePickerEventHandler::QueryInterface(REFIID rII
//-----------------------------------------------------------------------------------------
ULONG STDMETHODCALLTYPE VistaFilePickerEventHandler::AddRef()
{
- return osl_incrementInterlockedCount(&m_nRefCount);
+ return osl_atomic_increment(&m_nRefCount);
}
//-----------------------------------------------------------------------------------------
diff --git a/framework/inc/helper/shareablemutex.hxx b/framework/inc/helper/shareablemutex.hxx
index c96af1a5926a..a99a44e553f7 100644
--- a/framework/inc/helper/shareablemutex.hxx
+++ b/framework/inc/helper/shareablemutex.hxx
@@ -54,12 +54,12 @@ class FWI_DLLPUBLIC ShareableMutex
MutexRef() : m_refCount(0) {}
void acquire()
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
}
void release()
{
- if ( osl_decrementInterlockedCount( &m_refCount ) == 0 )
+ if ( osl_atomic_decrement( &m_refCount ) == 0 )
delete this;
}
diff --git a/framework/source/fwe/helper/documentundoguard.cxx b/framework/source/fwe/helper/documentundoguard.cxx
index fb522f905a2c..8fe601152797 100644
--- a/framework/source/fwe/helper/documentundoguard.cxx
+++ b/framework/source/fwe/helper/documentundoguard.cxx
@@ -62,11 +62,11 @@ namespace framework
,m_nRelativeContextDepth( 0 )
,m_documentDisposed( false )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_xUndoManager->addUndoManagerListener( this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
UndoManagerContextListener()
@@ -158,35 +158,35 @@ namespace framework
void SAL_CALL UndoManagerContextListener::enteredContext( const UndoManagerEvent& i_event ) throw (RuntimeException)
{
(void)i_event;
- osl_incrementInterlockedCount( &m_nRelativeContextDepth );
+ osl_atomic_increment( &m_nRelativeContextDepth );
}
//------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManagerContextListener::enteredHiddenContext( const UndoManagerEvent& i_event ) throw (RuntimeException)
{
(void)i_event;
- osl_incrementInterlockedCount( &m_nRelativeContextDepth );
+ osl_atomic_increment( &m_nRelativeContextDepth );
}
//------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManagerContextListener::leftContext( const UndoManagerEvent& i_event ) throw (RuntimeException)
{
(void)i_event;
- osl_decrementInterlockedCount( &m_nRelativeContextDepth );
+ osl_atomic_decrement( &m_nRelativeContextDepth );
}
//------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManagerContextListener::leftHiddenContext( const UndoManagerEvent& i_event ) throw (RuntimeException)
{
(void)i_event;
- osl_decrementInterlockedCount( &m_nRelativeContextDepth );
+ osl_atomic_decrement( &m_nRelativeContextDepth );
}
//------------------------------------------------------------------------------------------------------------------
void SAL_CALL UndoManagerContextListener::cancelledContext( const UndoManagerEvent& i_event ) throw (RuntimeException)
{
(void)i_event;
- osl_decrementInterlockedCount( &m_nRelativeContextDepth );
+ osl_atomic_decrement( &m_nRelativeContextDepth );
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index ea4dd1191f4b..54fdc51d5093 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -371,7 +371,7 @@ bool GlobalImageList::hasImage( sal_Int16 nImageType, const rtl::OUString& rComm
oslInterlockedCount GlobalImageList::acquire()
{
- osl_incrementInterlockedCount( &m_nRefCount );
+ osl_atomic_increment( &m_nRefCount );
return m_nRefCount;
}
@@ -379,7 +379,7 @@ oslInterlockedCount GlobalImageList::release()
{
osl::MutexGuard guard( getGlobalImageListMutex() );
- if ( !osl_decrementInterlockedCount( &m_nRefCount ))
+ if ( !osl_atomic_decrement( &m_nRefCount ))
{
oslInterlockedCount nCount( m_nRefCount );
// remove global pointer as we destroy the object now
diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx
index 1b6d7efb5725..73e3418a51fb 100644
--- a/io/source/acceptor/acc_pipe.cxx
+++ b/io/source/acceptor/acc_pipe.cxx
@@ -134,7 +134,7 @@ namespace io_acceptor
throw( ::com::sun::star::io::IOException,
::com::sun::star::uno::RuntimeException)
{
- if( 1 == osl_incrementInterlockedCount( (&m_nStatus) ) )
+ if( 1 == osl_atomic_increment( (&m_nStatus) ) )
{
m_pipe.close();
}
diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx
index 93f2f274610f..8cfcfb60bd8d 100644
--- a/io/source/acceptor/acc_socket.cxx
+++ b/io/source/acceptor/acc_socket.cxx
@@ -288,7 +288,7 @@ namespace io_acceptor {
::com::sun::star::uno::RuntimeException)
{
// enshure close is called only once
- if( 1 == osl_incrementInterlockedCount( (&m_nStatus) ) )
+ if( 1 == osl_atomic_increment( (&m_nStatus) ) )
{
m_socket.shutdown();
notifyListeners(this, &_closed, callClosed);
diff --git a/io/source/connector/ctr_pipe.cxx b/io/source/connector/ctr_pipe.cxx
index 7794bf02c453..d84afc4b2f2f 100644
--- a/io/source/connector/ctr_pipe.cxx
+++ b/io/source/connector/ctr_pipe.cxx
@@ -92,7 +92,7 @@ namespace stoc_connector {
::com::sun::star::uno::RuntimeException)
{
// ensure that close is called only once
- if(1 == osl_incrementInterlockedCount( (&m_nStatus) ) )
+ if(1 == osl_atomic_increment( (&m_nStatus) ) )
{
m_pipe.close();
}
diff --git a/io/source/connector/ctr_socket.cxx b/io/source/connector/ctr_socket.cxx
index 292a002b800c..f6103933a72a 100644
--- a/io/source/connector/ctr_socket.cxx
+++ b/io/source/connector/ctr_socket.cxx
@@ -212,7 +212,7 @@ namespace stoc_connector {
::com::sun::star::uno::RuntimeException)
{
// ensure that close is called only once
- if( 1 == osl_incrementInterlockedCount( (&m_nStatus) ) )
+ if( 1 == osl_atomic_increment( (&m_nStatus) ) )
{
m_socket.shutdown();
notifyListeners(this, &_closed, callClosed);
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index c29205ab8581..8a84fa6718e7 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -75,14 +75,14 @@ LinguOptions::LinguOptions()
aLinguCfg.GetOptions( *pData );
}
- osl_incrementInterlockedCount( &nRefCount );
+ osl_atomic_increment( &nRefCount );
}
LinguOptions::LinguOptions(const LinguOptions & /*rOpt*/)
{
DBG_ASSERT( pData, "lng : data missing" );
- osl_incrementInterlockedCount( &nRefCount );
+ osl_atomic_increment( &nRefCount );
}
@@ -90,7 +90,7 @@ LinguOptions::~LinguOptions()
{
MutexGuard aGuard( GetLinguMutex() );
- if ( osl_decrementInterlockedCount( &nRefCount ) == 0 )
+ if ( osl_atomic_decrement( &nRefCount ) == 0 )
{
delete pData; pData = NULL;
}
diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx b/mysqlc/source/mysqlc_databasemetadata.cxx
index d0e94e347265..e134e05d6e0e 100644
--- a/mysqlc/source/mysqlc_databasemetadata.cxx
+++ b/mysqlc/source/mysqlc_databasemetadata.cxx
@@ -89,9 +89,9 @@ ODatabaseMetaData::ODatabaseMetaData(OConnection& _rCon)
OSL_TRACE("ODatabaseMetaData::ODatabaseMetaData");
if (!m_rConnection.isCatalogUsed())
{
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable());
- osl_decrementInterlockedCount(&m_refCount);
+ osl_atomic_decrement(&m_refCount);
}
}
/* }}} */
diff --git a/mysqlc/source/mysqlc_driver.cxx b/mysqlc/source/mysqlc_driver.cxx
index 676c6c65aa59..029fe0faa341 100644
--- a/mysqlc/source/mysqlc_driver.cxx
+++ b/mysqlc/source/mysqlc_driver.cxx
@@ -309,8 +309,8 @@ void release(oslInterlockedCount& _refCount,
Reference< XInterface >& _xInterface,
::com::sun::star::lang::XComponent* _pObject)
{
- if (osl_decrementInterlockedCount(&_refCount) == 0) {
- osl_incrementInterlockedCount(&_refCount);
+ if (osl_atomic_decrement(&_refCount) == 0) {
+ osl_atomic_increment(&_refCount);
if (!rBHelper.bDisposed && !rBHelper.bInDispose) {
// remember the parent
@@ -334,7 +334,7 @@ void release(oslInterlockedCount& _refCount,
}
}
} else {
- osl_incrementInterlockedCount(&_refCount);
+ osl_atomic_increment(&_refCount);
}
}
/* }}} */
diff --git a/o3tl/inc/o3tl/cow_wrapper.hxx b/o3tl/inc/o3tl/cow_wrapper.hxx
index 5b9ce7877adc..b54f99d0f190 100644
--- a/o3tl/inc/o3tl/cow_wrapper.hxx
+++ b/o3tl/inc/o3tl/cow_wrapper.hxx
@@ -50,13 +50,13 @@ namespace o3tl
struct ThreadSafeRefCountingPolicy
{
typedef oslInterlockedCount ref_count_t;
- static void incrementCount( ref_count_t& rCount ) { osl_incrementInterlockedCount(&rCount); }
+ static void incrementCount( ref_count_t& rCount ) { osl_atomic_increment(&rCount); }
static bool decrementCount( ref_count_t& rCount )
{
if( rCount == 1 ) // caller is already the only/last reference
return false;
else
- return osl_decrementInterlockedCount(&rCount) != 0;
+ return osl_atomic_decrement(&rCount) != 0;
}
};
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
index dbd11bcecd8a..c3eabe23b8a9 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
@@ -150,14 +150,14 @@ void MyService1Impl::acquire()
throw ()
{
// thread-safe incrementation of reference count
- ::osl_incrementInterlockedCount( &m_refcount );
+ ::osl_atomic_increment( &m_refcount );
}
void MyService1Impl::release()
throw ()
{
// thread-safe decrementation of reference count
- if (0 == ::osl_decrementInterlockedCount( &m_refcount ))
+ if (0 == ::osl_atomic_decrement( &m_refcount ))
{
delete this; // shutdown this object
}
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx
index 0713384a8df9..bfb252951b12 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx
@@ -80,7 +80,7 @@ void SAL_CALL OConnection::release() throw()
//-----------------------------------------------------------------------------
void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyValue >& info) throw(SQLException)
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
// some example code how to get the information out of the sequence
@@ -129,7 +129,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
}
m_sUser = aUID;
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// XServiceInfo
// --------------------------------------------------------------------------------
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.cxx
index 4b424beaa1ea..05c74a020ecb 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.cxx
@@ -52,9 +52,9 @@ ODatabaseMetaData::ODatabaseMetaData(OConnection* _pCon)
OSL_ENSURE(m_pConnection,"ODatabaseMetaData::ODatabaseMetaData: No connection set!");
if(!m_pConnection->isCatalogUsed())
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable());
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
}
// -------------------------------------------------------------------------
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx
index 0318a1b66f01..9eb10f3f58ad 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx
@@ -166,9 +166,9 @@ void release(oslInterlockedCount& _refCount,
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface,
::com::sun::star::lang::XComponent* _pObject)
{
- if (osl_decrementInterlockedCount( &_refCount ) == 0)
+ if (osl_atomic_decrement( &_refCount ) == 0)
{
- osl_incrementInterlockedCount( &_refCount );
+ osl_atomic_increment( &_refCount );
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
{
@@ -195,7 +195,7 @@ void release(oslInterlockedCount& _refCount,
}
}
else
- osl_incrementInterlockedCount( &_refCount );
+ osl_atomic_increment( &_refCount );
}
void checkDisposed(sal_Bool _bThrow) throw ( DisposedException )
diff --git a/rdbmaker/inc/codemaker/registry.hxx b/rdbmaker/inc/codemaker/registry.hxx
index 78368b1ec190..404d53bfe571 100644
--- a/rdbmaker/inc/codemaker/registry.hxx
+++ b/rdbmaker/inc/codemaker/registry.hxx
@@ -95,12 +95,12 @@ public:
inline void acquire()
{
if (m_pImpl)
- osl_incrementInterlockedCount(&m_pImpl->m_refCount);
+ osl_atomic_increment(&m_pImpl->m_refCount);
}
inline void release()
{
- if (m_pImpl && 0 == osl_decrementInterlockedCount(&m_pImpl->m_refCount))
+ if (m_pImpl && 0 == osl_atomic_decrement(&m_pImpl->m_refCount))
{
delete m_pImpl;
}
diff --git a/rdbmaker/source/codemaker/dependency.cxx b/rdbmaker/source/codemaker/dependency.cxx
index 970add921522..cd1a5f2449eb 100644
--- a/rdbmaker/source/codemaker/dependency.cxx
+++ b/rdbmaker/source/codemaker/dependency.cxx
@@ -36,12 +36,12 @@ TypeDependency::~TypeDependency()
void TypeDependency::acquire()
{
- osl_incrementInterlockedCount(&m_pImpl->m_refCount);
+ osl_atomic_increment(&m_pImpl->m_refCount);
}
void TypeDependency::release()
{
- if (0 == osl_decrementInterlockedCount(&m_pImpl->m_refCount))
+ if (0 == osl_atomic_decrement(&m_pImpl->m_refCount))
{
delete m_pImpl;
}
diff --git a/rdbmaker/source/codemaker/typemanager.cxx b/rdbmaker/source/codemaker/typemanager.cxx
index 93f7bb4de6b6..b0d0a14ca8a0 100644
--- a/rdbmaker/source/codemaker/typemanager.cxx
+++ b/rdbmaker/source/codemaker/typemanager.cxx
@@ -37,13 +37,13 @@ TypeManager::~TypeManager()
sal_Int32 TypeManager::acquire()
{
- return osl_incrementInterlockedCount(&m_pImpl->m_refCount);
+ return osl_atomic_increment(&m_pImpl->m_refCount);
}
sal_Int32 TypeManager::release()
{
sal_Int32 refCount = 0;
- if (0 == (refCount = osl_decrementInterlockedCount(&m_pImpl->m_refCount)) )
+ if (0 == (refCount = osl_atomic_decrement(&m_pImpl->m_refCount)) )
{
delete m_pImpl;
}
diff --git a/reportdesign/source/core/api/FixedLine.cxx b/reportdesign/source/core/api/FixedLine.cxx
index dee328a2c085..4cd06eeae952 100644
--- a/reportdesign/source/core/api/FixedLine.cxx
+++ b/reportdesign/source/core/api/FixedLine.cxx
@@ -166,7 +166,7 @@ OFixedLine::OFixedLine(uno::Reference< uno::XComponentContext > const & _xContex
DBG_CTOR(rpt_OFixedLine,NULL);
m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FIXEDLINE,m_aProps.aComponent.m_xContext->getServiceManager());
m_aProps.aComponent.m_xFactory = _xFactory;
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
try
{
awt::Size aSize = _xShape->getSize();
@@ -189,7 +189,7 @@ OFixedLine::OFixedLine(uno::Reference< uno::XComponentContext > const & _xContex
{
OSL_FAIL("OFixedLine::OFixedLine: Exception caught!");
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
OFixedLine::~OFixedLine()
diff --git a/reportdesign/source/core/api/FixedText.cxx b/reportdesign/source/core/api/FixedText.cxx
index aff7ff79acc4..dd47a11cb54f 100644
--- a/reportdesign/source/core/api/FixedText.cxx
+++ b/reportdesign/source/core/api/FixedText.cxx
@@ -73,11 +73,11 @@ OFixedText::OFixedText(uno::Reference< uno::XComponentContext > const & _xContex
m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FIXEDTEXT,m_aProps.aComponent.m_xContext->getServiceManager());
m_aProps.aComponent.m_nBorder = 0; // no border
m_aProps.aComponent.m_xFactory = _xFactory;
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_aProps.aComponent.setShape(_xShape,this,m_refCount);
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
OFixedText::~OFixedText()
diff --git a/reportdesign/source/core/api/FormattedField.cxx b/reportdesign/source/core/api/FormattedField.cxx
index 95a2243b6a59..ddd4125a6a84 100644
--- a/reportdesign/source/core/api/FormattedField.cxx
+++ b/reportdesign/source/core/api/FormattedField.cxx
@@ -80,11 +80,11 @@ OFormattedField::OFormattedField(uno::Reference< uno::XComponentContext > const
DBG_CTOR( rpt_OFormattedField,NULL);
m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FORMATTEDFIELD,m_aProps.aComponent.m_xContext->getServiceManager());
m_aProps.aComponent.m_xFactory = _xFactory;
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_aProps.aComponent.setShape(_xShape,this,m_refCount);
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
OFormattedField::~OFormattedField()
diff --git a/reportdesign/source/core/api/Group.cxx b/reportdesign/source/core/api/Group.cxx
index fbcad5aeb276..c11bb7e43606 100644
--- a/reportdesign/source/core/api/Group.cxx
+++ b/reportdesign/source/core/api/Group.cxx
@@ -54,11 +54,11 @@ OGroup::OGroup(const uno::Reference< report::XGroups >& _xParent
,m_xParent(_xParent)
{
DBG_CTOR( rpt_OGroup,NULL);
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
{
m_xFunctions = new OFunctions(this,m_xContext);
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------------
// TODO: VirtualFunctionFinder: This is virtual function!
diff --git a/reportdesign/source/core/api/ImageControl.cxx b/reportdesign/source/core/api/ImageControl.cxx
index 71d2a22f874c..0b7e55cbc1fb 100644
--- a/reportdesign/source/core/api/ImageControl.cxx
+++ b/reportdesign/source/core/api/ImageControl.cxx
@@ -146,11 +146,11 @@ OImageControl::OImageControl(uno::Reference< uno::XComponentContext > const & _x
DBG_CTOR( rpt_OImageControl,NULL);
m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_IMAGECONTROL,m_aProps.aComponent.m_xContext->getServiceManager());
m_aProps.aComponent.m_xFactory = _xFactory;
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_aProps.aComponent.setShape(_xShape,this,m_refCount);
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
OImageControl::~OImageControl()
diff --git a/reportdesign/source/core/api/ReportComponent.cxx b/reportdesign/source/core/api/ReportComponent.cxx
index 6160ff898158..f7105362e596 100644
--- a/reportdesign/source/core/api/ReportComponent.cxx
+++ b/reportdesign/source/core/api/ReportComponent.cxx
@@ -104,7 +104,7 @@ OFormatProperties::OFormatProperties()
// -----------------------------------------------------------------------------
void OReportComponentProperties::setShape(uno::Reference< drawing::XShape >& _xShape,const uno::Reference< report::XReportComponent>& _xTunnel,oslInterlockedCount& _rRefCount)
{
- osl_incrementInterlockedCount( &_rRefCount );
+ osl_atomic_increment( &_rRefCount );
{
m_xProxy.set(_xShape,uno::UNO_QUERY);
::comphelper::query_aggregation(m_xProxy,m_xShape);
@@ -118,7 +118,7 @@ void OReportComponentProperties::setShape(uno::Reference< drawing::XShape >& _xS
if ( m_xProxy.is() )
m_xProxy->setDelegator( _xTunnel );
}
- osl_decrementInterlockedCount( &_rRefCount );
+ osl_atomic_decrement( &_rRefCount );
}
// -----------------------------------------------------------------------------
OReportComponentProperties::~OReportComponentProperties()
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 41adfc60c476..7e9f4f584f0e 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -658,14 +658,14 @@ OReportDefinition::OReportDefinition(uno::Reference< uno::XComponentContext > co
{
DBG_CTOR( rpt_OReportDefinition,NULL);
m_aProps->m_sName = RPT_RESSTRING(RID_STR_REPORT,m_aProps->m_xContext->getServiceManager());
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
{
init();
m_pImpl->m_xGroups = new OGroups(this,m_aProps->m_xContext);
m_pImpl->m_xDetail = OSection::createOSection(this,m_aProps->m_xContext);
m_pImpl->m_xDetail->setName(RPT_RESSTRING(RID_STR_DETAIL,m_aProps->m_xContext->getServiceManager()));
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
OReportDefinition::OReportDefinition(uno::Reference< uno::XComponentContext > const & _xContext
@@ -678,7 +678,7 @@ OReportDefinition::OReportDefinition(uno::Reference< uno::XComponentContext > co
{
m_aProps->m_sName = RPT_RESSTRING(RID_STR_REPORT,m_aProps->m_xContext->getServiceManager());
m_aProps->m_xFactory = _xFactory;
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
{
m_aProps->setShape(_xShape,this,m_refCount);
init();
@@ -686,7 +686,7 @@ OReportDefinition::OReportDefinition(uno::Reference< uno::XComponentContext > co
m_pImpl->m_xDetail = OSection::createOSection(this,m_aProps->m_xContext);
m_pImpl->m_xDetail->setName(RPT_RESSTRING(RID_STR_DETAIL,m_aProps->m_xContext->getServiceManager()));
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
OReportDefinition::OReportDefinition(const OReportDefinition& _rCopy)
@@ -698,7 +698,7 @@ OReportDefinition::OReportDefinition(const OReportDefinition& _rCopy)
,m_pImpl(new OReportDefinitionImpl(m_aMutex,*_rCopy.m_pImpl))
{
DBG_CTOR( rpt_OReportDefinition,NULL);
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
{
init();
OGroups* pGroups = new OGroups(this,m_aProps->m_xContext);
@@ -716,7 +716,7 @@ OReportDefinition::OReportDefinition(const OReportDefinition& _rCopy)
OSection::lcl_copySection(_rCopy.m_pImpl->m_xReportHeader,m_pImpl->m_xReportHeader);
OSection::lcl_copySection(_rCopy.m_pImpl->m_xReportFooter,m_pImpl->m_xReportFooter);
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
OReportDefinition::~OReportDefinition()
diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx
index 2685b12f2c8d..b92a23382f9a 100644
--- a/reportdesign/source/core/api/Shape.cxx
+++ b/reportdesign/source/core/api/Shape.cxx
@@ -87,7 +87,7 @@ OShape::OShape(uno::Reference< uno::XComponentContext > const & _xContext
DBG_CTOR( rpt_OShape,NULL);
m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_SHAPE,m_aProps.aComponent.m_xContext->getServiceManager());
m_aProps.aComponent.m_xFactory = _xFactory;
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
uno::Reference<beans::XPropertySet> xProp(_xShape,uno::UNO_QUERY);
if ( xProp.is() )
@@ -97,7 +97,7 @@ OShape::OShape(uno::Reference< uno::XComponentContext > const & _xContext
}
m_aProps.aComponent.setShape(_xShape,this,m_refCount);
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// -----------------------------------------------------------------------------
OShape::~OShape()
diff --git a/reportdesign/source/core/sdr/PropertyForward.cxx b/reportdesign/source/core/sdr/PropertyForward.cxx
index 23b9543ba501..9c8cc05162f5 100644
--- a/reportdesign/source/core/sdr/PropertyForward.cxx
+++ b/reportdesign/source/core/sdr/PropertyForward.cxx
@@ -55,7 +55,7 @@ OPropertyMediator::OPropertyMediator(const Reference< XPropertySet>& _xSource
,m_bInChange(sal_False)
{
DBG_CTOR( rpt_OPropertyMediator,NULL);
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
OSL_ENSURE(m_xDest.is(),"Dest is NULL!");
OSL_ENSURE(m_xSource.is(),"Source is NULL!");
if ( m_xDest.is() && m_xSource.is() )
@@ -96,7 +96,7 @@ OPropertyMediator::OPropertyMediator(const Reference< XPropertySet>& _xSource
(void)e;
}
}
- osl_decrementInterlockedCount(&m_refCount);
+ osl_atomic_decrement(&m_refCount);
}
// -----------------------------------------------------------------------------
OPropertyMediator::~OPropertyMediator()
diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx
index cfb35bce51cf..bda520b8afb6 100644
--- a/reportdesign/source/core/sdr/UndoEnv.cxx
+++ b/reportdesign/source/core/sdr/UndoEnv.cxx
@@ -150,13 +150,13 @@ OXUndoEnvironment::~OXUndoEnvironment()
void OXUndoEnvironment::Lock()
{
OSL_ENSURE(m_refCount,"Illegal call to dead object!");
- osl_incrementInterlockedCount( &m_pImpl->m_nLocks );
+ osl_atomic_increment( &m_pImpl->m_nLocks );
}
void OXUndoEnvironment::UnLock()
{
OSL_ENSURE(m_refCount,"Illegal call to dead object!");
- osl_decrementInterlockedCount( &m_pImpl->m_nLocks );
+ osl_atomic_decrement( &m_pImpl->m_nLocks );
}
sal_Bool OXUndoEnvironment::IsLocked() const { return m_pImpl->m_nLocks != 0; }
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx
index 61219dc0531e..ebe551c0ca23 100644
--- a/reportdesign/source/ui/misc/toolboxcontroller.cxx
+++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx
@@ -109,9 +109,9 @@ OToolboxController::OToolboxController(const Reference< XMultiServiceFactory >&
,m_nSlotId(0)
{
DBG_CTOR(rpt_OToolboxController,NULL);
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
m_xServiceManager = _rxORB;
- osl_decrementInterlockedCount(&m_refCount);
+ osl_atomic_decrement(&m_refCount);
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx
index 9d28856f13b2..53dd211bb05c 100644
--- a/reportdesign/source/ui/report/ReportControllerObserver.cxx
+++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx
@@ -189,13 +189,13 @@ public:
void OXReportControllerObserver::Lock()
{
OSL_ENSURE(m_refCount,"Illegal call to dead object!");
- osl_incrementInterlockedCount( &m_pImpl->m_nLocks );
+ osl_atomic_increment( &m_pImpl->m_nLocks );
}
void OXReportControllerObserver::UnLock()
{
OSL_ENSURE(m_refCount,"Illegal call to dead object!");
- osl_decrementInterlockedCount( &m_pImpl->m_nLocks );
+ osl_atomic_decrement( &m_pImpl->m_nLocks );
}
sal_Bool OXReportControllerObserver::IsLocked() const { return m_pImpl->m_nLocks != 0; }
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index 8a191bae5ca5..fe52a140e123 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -65,7 +65,7 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sCol
DBG_CTOR( rpt_OStartMarker,NULL);
SetUniqueId(HID_RPT_STARTMARKER);
- osl_incrementInterlockedCount(&s_nImageRefCount);
+ osl_atomic_increment(&s_nImageRefCount);
initDefaultNodeImages();
ImplInitSettings();
m_aText.SetHelpId(HID_RPT_START_TITLE);
@@ -90,7 +90,7 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sCol
OStartMarker::~OStartMarker()
{
DBG_DTOR( rpt_OStartMarker,NULL);
- if ( osl_decrementInterlockedCount(&s_nImageRefCount) == 0 )
+ if ( osl_atomic_decrement(&s_nImageRefCount) == 0 )
{
DELETEZ(s_pDefCollapsed);
DELETEZ(s_pDefExpanded);
diff --git a/sal/inc/rtl/unload.h b/sal/inc/rtl/unload.h
index cdd5536e6bc9..825d7778e5d1 100644
--- a/sal/inc/rtl/unload.h
+++ b/sal/inc/rtl/unload.h
@@ -263,7 +263,7 @@ access to a counter variable, e.g. the <code>rtl_moduleCount_release</code> impl
extern "C" void rtl_moduleCount_acquire(rtl_ModuleCount * that )
{
rtl_StandardModuleCount* pMod= (rtl_StandardModuleCount*)that;
- osl_incrementInterlockedCount( &pMod->counter);
+ osl_atomic_increment( &pMod->counter);
}
</pre>
The SAL library offers functions that can be used for <code>acquire</code> and <code>release</code>. See struct
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));
}
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());
diff --git a/salhelper/inc/salhelper/simplereferenceobject.hxx b/salhelper/inc/salhelper/simplereferenceobject.hxx
index b32450c295dd..12886e111128 100644
--- a/salhelper/inc/salhelper/simplereferenceobject.hxx
+++ b/salhelper/inc/salhelper/simplereferenceobject.hxx
@@ -67,10 +67,10 @@ public:
(which, hopefully, is quite large).
*/
inline void acquire() SAL_THROW(())
- { osl_incrementInterlockedCount(&m_nCount); }
+ { osl_atomic_increment(&m_nCount); }
inline void release() SAL_THROW(())
- { if (osl_decrementInterlockedCount(&m_nCount) == 0) delete this; }
+ { if (osl_atomic_decrement(&m_nCount) == 0) delete this; }
/** see general class documentation
*/
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index 3b1705b4c784..60a035b4f0d2 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -80,7 +80,7 @@ ScAccessibleCell::~ScAccessibleCell()
if (!ScAccessibleContextBase::IsDefunc() && !rBHelper.bInDispose)
{
// increment refcount to prevent double call off dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
// call dispose to inform object wich have a weak reference to this object
dispose();
}
diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
index 9044530a1387..1245ed9dbe08 100644
--- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
@@ -71,7 +71,7 @@ ScAccessibleContextBase::~ScAccessibleContextBase(void)
if (!IsDefunc() && !rBHelper.bInDispose)
{
// increment refcount to prevent double call off dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
// call dispose to inform object wich have a weak reference to this object
dispose();
}
diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index 0f72ad9ba4cf..febd32795a25 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -272,7 +272,7 @@ void ScAccessibleCsvControl::implDispose()
if( implIsAlive() )
{
// prevent multiple call of dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
index 0b826fa1f016..ffac59b95eaa 100644
--- a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
@@ -164,7 +164,7 @@ ScAccessibleDataPilotControl::~ScAccessibleDataPilotControl(void)
if (!IsDefunc() && !rBHelper.bInDispose)
{
// increment refcount to prevent double call off dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
// call dispose to inform object wich have a weak reference to this object
dispose();
}
@@ -542,7 +542,7 @@ ScAccessibleDataPilotButton::~ScAccessibleDataPilotButton(void)
if (!IsDefunc() && !rBHelper.bInDispose)
{
// increment refcount to prevent double call off dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
// call dispose to inform object wich have a weak reference to this object
dispose();
}
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 5f2ab065b98a..aa5f778e040c 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -1243,7 +1243,7 @@ ScAccessibleDocument::~ScAccessibleDocument(void)
if (!ScAccessibleContextBase::IsDefunc() && !rBHelper.bInDispose)
{
// increment refcount to prevent double call off dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index f3ccf181cf1f..f9c7736bc35d 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1274,7 +1274,7 @@ ScAccessibleDocumentPagePreview::~ScAccessibleDocumentPagePreview(void)
if (!ScAccessibleDocumentBase::IsDefunc() && !rBHelper.bInDispose)
{
// increment refcount to prevent double call off dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
// call dispose to inform object wich have a weak reference to this object
dispose();
}
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index 0ef44ef1020b..553f29374bfc 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -71,7 +71,7 @@ ScAccessibleEditObject::~ScAccessibleEditObject()
if (!ScAccessibleContextBase::IsDefunc() && !rBHelper.bInDispose)
{
// increment refcount to prevent double call off dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
// call dispose to inform object wich have a weak reference to this object
dispose();
}
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
index a0e9a71c8d3d..5af2ec182fbc 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
@@ -102,7 +102,7 @@ ScAccessiblePageHeader::~ScAccessiblePageHeader()
if (!ScAccessibleContextBase::IsDefunc() && !rBHelper.bInDispose)
{
// increment refcount to prevent double call off dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
index 16e5d459bebc..bc98e1f0008d 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
@@ -74,7 +74,7 @@ ScAccessiblePageHeaderArea::~ScAccessiblePageHeaderArea(void)
if (!ScAccessibleContextBase::IsDefunc() && !rBHelper.bInDispose)
{
// increment refcount to prevent double call off dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
index 3161c39710bc..36f9b9778770 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
@@ -67,7 +67,7 @@ ScAccessiblePreviewCell::~ScAccessiblePreviewCell()
if (!ScAccessibleContextBase::IsDefunc() && !rBHelper.bInDispose)
{
// increment refcount to prevent double call off dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
// call dispose to inform object wich have a weak reference to this object
dispose();
}
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index 40e95da69131..3db344cb5d4e 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -73,7 +73,7 @@ ScAccessiblePreviewTable::~ScAccessiblePreviewTable()
if (!ScAccessibleContextBase::IsDefunc() && !rBHelper.bInDispose)
{
// increment refcount to prevent double call off dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose();
}
}
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index bc8c95478fd5..136f2316e64f 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -312,7 +312,7 @@ ScCellFieldsObj::~ScCellFieldsObj()
delete mpEditSource;
// increment refcount to prevent double call off dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
if (mpRefreshListeners)
{
@@ -492,7 +492,7 @@ ScHeaderFieldsObj::~ScHeaderFieldsObj()
delete mpEditSource;
// increment refcount to prevent double call off dtor
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
if (mpRefreshListeners)
{
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index f56c79fc23b0..9aaf008b85ab 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -225,7 +225,7 @@ ScVbaWindow::init()
the own refcount to be non-zero, otherwise this instance will be
desctructed immediately! Guard the call to ActivePane() in try/catch to
not miss the decrementation of the reference count on exception. */
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
try
{
m_xPane = ActivePane();
@@ -233,7 +233,7 @@ ScVbaWindow::init()
catch( uno::Exception& )
{
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
uno::Reference< beans::XPropertySet >
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
index aef26be9cb06..68c2f70c3a91 100644
--- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx
+++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
@@ -413,7 +413,7 @@ public:
if ( m_xAggProxy.is() )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
/* i35609 - Fix crash on Solaris. The setDelegator call needs
to be in its own block to ensure that all temporary Reference
@@ -424,7 +424,7 @@ public:
static_cast< cppu::OWeakObject * >( this ) );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
}
@@ -514,12 +514,12 @@ public:
throw ()
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
}
virtual void SAL_CALL release()
throw ()
{
- if ( osl_decrementInterlockedCount( &m_refCount ) == 0 )
+ if ( osl_atomic_decrement( &m_refCount ) == 0 )
{
delete this;
}
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index e85e8ca78d52..4bedcc0fdbfc 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -764,10 +764,10 @@ SdStyleSheet* SdStyleSheet::CreateEmptyUserStyle( SfxStyleSheetBasePool& rPool,
void SAL_CALL SdStyleSheet::release( ) throw ()
{
- if (osl_decrementInterlockedCount( &m_refCount ) == 0)
+ if (osl_atomic_decrement( &m_refCount ) == 0)
{
// restore reference count:
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
if (! mrBHelper.bDisposed) try
{
dispose();
diff --git a/sd/source/helper/simplereferencecomponent.cxx b/sd/source/helper/simplereferencecomponent.cxx
index 353a9e996b00..3dbb39daee47 100644
--- a/sd/source/helper/simplereferencecomponent.cxx
+++ b/sd/source/helper/simplereferencecomponent.cxx
@@ -51,7 +51,7 @@ SimpleReferenceComponent::~SimpleReferenceComponent()
void SimpleReferenceComponent::acquire()
{
- osl_incrementInterlockedCount(&m_nCount);
+ osl_atomic_increment(&m_nCount);
}
void SimpleReferenceComponent::release()
@@ -75,7 +75,7 @@ void SimpleReferenceComponent::release()
}
}
- if(osl_decrementInterlockedCount(&m_nCount) == 0) delete this;
+ if(osl_atomic_decrement(&m_nCount) == 0) delete this;
}
void SimpleReferenceComponent::Dispose()
diff --git a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
index fae7729860c7..0f75235624ee 100644
--- a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
+++ b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
@@ -297,11 +297,11 @@ ConfigurationListener::ConfigurationListener( ToolPanelViewShell_Impl& i_rShellI
xBroadcaster.set( pFrameworkHelper->GetConfigurationController().get() );
ENSURE_OR_THROW( pFrameworkHelper.get(), "no access to the config controller" );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
xBroadcaster->addConfigurationChangeListener( this, ::rtl::OUString(), Any() );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
// ---------------------------------------------------------------------------------------------------------------------
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 264fdec356eb..88b43ad7e4c8 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -284,10 +284,10 @@ void SAL_CALL SdXImpressDocument::acquire() throw ( )
void SAL_CALL SdXImpressDocument::release() throw ( )
{
- if (osl_decrementInterlockedCount( &m_refCount ) == 0)
+ if (osl_atomic_decrement( &m_refCount ) == 0)
{
// restore reference count:
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
if(!mbDisposed)
{
try
diff --git a/sd/workben/custompanel/ctp_panel.cxx b/sd/workben/custompanel/ctp_panel.cxx
index c87611101f94..85a976313ed9 100644
--- a/sd/workben/custompanel/ctp_panel.cxx
+++ b/sd/workben/custompanel/ctp_panel.cxx
@@ -132,7 +132,7 @@ namespace sd { namespace colortoolpanel
{
DBG_UNHANDLED_EXCEPTION();
}
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
if ( xParentWindow.is() )
{
m_xWindow = lcl_createPlainWindow_nothrow( m_xContext, xParentPeer );
@@ -144,7 +144,7 @@ namespace sd { namespace colortoolpanel
m_xWindow->setVisible( sal_True );
}
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/sfx2/workben/custompanel/ctp_panel.cxx b/sfx2/workben/custompanel/ctp_panel.cxx
index 2910add96009..6cde8e4e5fb9 100644
--- a/sfx2/workben/custompanel/ctp_panel.cxx
+++ b/sfx2/workben/custompanel/ctp_panel.cxx
@@ -114,7 +114,7 @@ namespace sd { namespace colortoolpanel
// retrieve the parent window for our to-be-created pane window
Reference< XWindowPeer > xParentPeer( i_rParentWindow, UNO_QUERY );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
if ( xParentPeer.is() )
{
m_xWindow = lcl_createPlainWindow_nothrow( i_rContext, xParentPeer );
@@ -126,7 +126,7 @@ namespace sd { namespace colortoolpanel
m_xWindow->setVisible( sal_True );
}
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx
index 1a1ab13bec10..396f0e1984fd 100644
--- a/stoc/source/invocation_adapterfactory/iafactory.cxx
+++ b/stoc/source/invocation_adapterfactory/iafactory.cxx
@@ -193,7 +193,7 @@ inline AdapterImpl::~AdapterImpl()
inline void AdapterImpl::acquire()
SAL_THROW(())
{
- ::osl_incrementInterlockedCount( &m_nRef );
+ ::osl_atomic_increment( &m_nRef );
}
//______________________________________________________________________________
inline void AdapterImpl::release()
@@ -202,7 +202,7 @@ inline void AdapterImpl::release()
bool delete_this = false;
{
MutexGuard guard( m_pFactory->m_mutex );
- if (! ::osl_decrementInterlockedCount( &m_nRef ))
+ if (! ::osl_atomic_decrement( &m_nRef ))
{
t_ptr_map::iterator iFind(
m_pFactory->m_receiver2adapters.find( m_key ) );
diff --git a/stoc/source/proxy_factory/proxyfac.cxx b/stoc/source/proxy_factory/proxyfac.cxx
index a3f2177ed4d1..54868e4766f0 100644
--- a/stoc/source/proxy_factory/proxyfac.cxx
+++ b/stoc/source/proxy_factory/proxyfac.cxx
@@ -217,7 +217,7 @@ static void SAL_CALL binuno_proxy_free(
static void SAL_CALL binuno_proxy_acquire( uno_Interface * pUnoI )
{
binuno_Proxy * that = static_cast< binuno_Proxy * >( pUnoI );
- if (osl_incrementInterlockedCount( &that->m_nRefCount ) == 1)
+ if (osl_atomic_increment( &that->m_nRefCount ) == 1)
{
// rebirth of zombie
uno_ExtEnvironment * uno_env =
@@ -236,7 +236,7 @@ static void SAL_CALL binuno_proxy_acquire( uno_Interface * pUnoI )
static void SAL_CALL binuno_proxy_release( uno_Interface * pUnoI )
{
binuno_Proxy * that = static_cast< binuno_Proxy * >( pUnoI );
- if (osl_decrementInterlockedCount( &that->m_nRefCount ) == 0)
+ if (osl_atomic_decrement( &that->m_nRefCount ) == 0)
{
uno_ExtEnvironment * uno_env =
that->m_root->m_factory->m_uno_env.get()->pExtEnv;
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index 7a6b4de5e797..ae72ae89ac3c 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -301,13 +301,13 @@ acc_CurrentContext::~acc_CurrentContext()
void acc_CurrentContext::acquire()
throw ()
{
- ::osl_incrementInterlockedCount( &m_refcount );
+ ::osl_atomic_increment( &m_refcount );
}
//__________________________________________________________________________________________________
void acc_CurrentContext::release()
throw ()
{
- if (! ::osl_decrementInterlockedCount( &m_refcount ))
+ if (! ::osl_atomic_decrement( &m_refcount ))
{
delete this;
}
diff --git a/stoc/test/security/test_security.cxx b/stoc/test/security/test_security.cxx
index 798370fc68b3..a094b21e2402 100644
--- a/stoc/test/security/test_security.cxx
+++ b/stoc/test/security/test_security.cxx
@@ -108,13 +108,13 @@ public:
void user_CurrentContext::acquire()
throw ()
{
- ::osl_incrementInterlockedCount( &m_refcount );
+ ::osl_atomic_increment( &m_refcount );
}
//__________________________________________________________________________________________________
void user_CurrentContext::release()
throw ()
{
- if (! ::osl_decrementInterlockedCount( &m_refcount ))
+ if (! ::osl_atomic_decrement( &m_refcount ))
{
delete this;
}
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;
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx
index 0ddd918e84fa..32af6f6e2a7f 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -135,11 +135,11 @@ AccessibleControlShape::AccessibleControlShape (
m_pChildManager = new OWrappedAccessibleChildrenManager( getProcessServiceFactory() );
m_pChildManager->acquire();
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
m_pChildManager->setOwningAccessible( this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//-----------------------------------------------------------------------------
@@ -280,14 +280,14 @@ void AccessibleControlShape::Init()
OSL_VERIFY( xNativeControlContext->queryInterface( ::getCppuType( &m_xControlContextComponent ) ) >>= m_xControlContextComponent );
// aggregate the proxy
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
if ( m_xControlContextProxy.is() )
{
// At this point in time, the proxy has a ref count of exactly one - in m_xControlContextProxy.
// Remember to _not_ reset this member unles the delegator of the proxy has been reset, too!
m_xControlContextProxy->setDelegator( *this );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
m_bDisposeNativeContext = sal_True;
diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx
index 252c6ab29b21..dd67a8293147 100644
--- a/svx/source/accessibility/charmapacc.cxx
+++ b/svx/source/accessibility/charmapacc.cxx
@@ -57,11 +57,11 @@ SvxShowCharSetVirtualAcc::SvxShowCharSetVirtualAcc( SvxShowCharSet* pParent ) :
,mpParent( pParent )
,m_pTable(NULL)
{
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
{
lateInit(this);
}
- osl_decrementInterlockedCount(&m_refCount);
+ osl_atomic_decrement(&m_refCount);
}
// -----------------------------------------------------------------------------
@@ -298,11 +298,11 @@ void SvxShowCharSetItem::ClearAccessible()
SvxShowCharSetAcc::SvxShowCharSetAcc( SvxShowCharSetVirtualAcc* _pParent ) : OAccessibleSelectionHelper(new VCLExternalSolarLock())
,m_pParent( _pParent )
{
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
{
lateInit(this);
}
- osl_decrementInterlockedCount(&m_refCount);
+ osl_atomic_decrement(&m_refCount);
}
// -----------------------------------------------------------------------------
@@ -641,11 +641,11 @@ SvxShowCharSetItemAcc::SvxShowCharSetItemAcc( SvxShowCharSetItem* pParent ) : OA
,mpParent( pParent )
{
OSL_ENSURE(pParent,"NO parent supplied!");
- osl_incrementInterlockedCount(&m_refCount);
+ osl_atomic_increment(&m_refCount);
{ // #b6211265 #
lateInit(this);
}
- osl_decrementInterlockedCount(&m_refCount);
+ osl_atomic_decrement(&m_refCount);
}
// -----------------------------------------------------------------------------
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index 3035a08abbb9..12732ab9597a 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -188,7 +188,7 @@ SvxRectCtlAccessibleContext::~SvxRectCtlAccessibleContext()
if( IsAlive() )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose(); // set mpRepr = NULL & release all children
}
}
@@ -782,7 +782,7 @@ SvxRectCtlChildAccessibleContext::~SvxRectCtlChildAccessibleContext()
if( IsAlive() )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose(); // set mpRepr = NULL & release all children
}
}
diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx
index 0223e18b9a1a..44552338f22b 100644
--- a/svx/source/form/ParseContext.cxx
+++ b/svx/source/form/ParseContext.cxx
@@ -199,7 +199,7 @@ namespace
OParseContextClient::OParseContextClient()
{
::osl::MutexGuard aGuard( getSafteyMutex() );
- if ( 1 == osl_incrementInterlockedCount( &getCounter() ) )
+ if ( 1 == osl_atomic_increment( &getCounter() ) )
{ // first instance
getSharedContext( new OSystemParseContext );
}
@@ -210,7 +210,7 @@ OParseContextClient::~OParseContextClient()
{
{
::osl::MutexGuard aGuard( getSafteyMutex() );
- if ( 0 == osl_decrementInterlockedCount( &getCounter() ) )
+ if ( 0 == osl_atomic_decrement( &getCounter() ) )
delete getSharedContext(NULL,sal_True);
}
}
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx
index 26a8ffb14ba9..3774d6f28ccd 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -358,13 +358,13 @@ namespace svxform
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL FormScriptingEnvironment::acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL FormScriptingEnvironment::release()
{
- if ( 0 == osl_decrementInterlockedCount( &m_refCount ) )
+ if ( 0 == osl_atomic_decrement( &m_refCount ) )
{
delete this;
return 0;
diff --git a/svx/source/form/fmtextcontrolfeature.cxx b/svx/source/form/fmtextcontrolfeature.cxx
index 817520ab6ff6..b8733b6169a0 100644
--- a/svx/source/form/fmtextcontrolfeature.cxx
+++ b/svx/source/form/fmtextcontrolfeature.cxx
@@ -54,7 +54,7 @@ namespace svx
OSL_ENSURE( m_nSlotId, "FmTextControlFeature::FmTextControlFeature: invalid slot id!" );
OSL_ENSURE( m_pInvalidator, "FmTextControlFeature::FmTextControlFeature: invalid invalidator!" );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
try
{
m_xDispatcher->addStatusListener( this, m_aFeatureURL );
@@ -63,7 +63,7 @@ namespace svx
{
OSL_FAIL( "FmTextControlFeature::FmTextControlFeature: caught an exception!" );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index 6234c9871d50..924fb8ecc67e 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -206,7 +206,7 @@ namespace svx
DBG_CTOR( FmFocusListenerAdapter, NULL );
DBG_ASSERT( m_xWindow.is(), "FmFocusListenerAdapter::FmFocusListenerAdapter: invalid control!" );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
try
{
@@ -218,7 +218,7 @@ namespace svx
DBG_UNHANDLED_EXCEPTION();
}
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------
@@ -303,7 +303,7 @@ namespace svx
DBG_CTOR( FmMouseListenerAdapter, NULL );
DBG_ASSERT( m_xWindow.is(), "FmMouseListenerAdapter::FmMouseListenerAdapter: invalid control!" );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
try
{
@@ -315,7 +315,7 @@ namespace svx
DBG_UNHANDLED_EXCEPTION();
}
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------
diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx
index ceaa327a5cc1..b1d5d54b4f0a 100644
--- a/svx/source/form/formcontrolling.cxx
+++ b/svx/source/form/formcontrolling.cxx
@@ -256,7 +256,7 @@ namespace svx
:m_aContext( _rContext )
,m_pInvalidationCallback( _pInvalidationCallback )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
try
{
m_xFormOperations = FormOperations::createWithFormController( m_aContext.getUNOContext(), _rxController );
@@ -273,7 +273,7 @@ namespace svx
{
DBG_UNHANDLED_EXCEPTION();
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//--------------------------------------------------------------------
diff --git a/svx/source/inc/fmundo.hxx b/svx/source/inc/fmundo.hxx
index 8ffe30b2a04d..fc809c768bb8 100644
--- a/svx/source/inc/fmundo.hxx
+++ b/svx/source/inc/fmundo.hxx
@@ -164,8 +164,8 @@ public:
// virtual sal_Bool queryInterface(UsrUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>&);
// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass>> getIdlClasses(void);
- void Lock() { osl_incrementInterlockedCount( &m_Locks ); }
- void UnLock() { osl_decrementInterlockedCount( &m_Locks ); }
+ void Lock() { osl_atomic_increment( &m_Locks ); }
+ void UnLock() { osl_atomic_decrement( &m_Locks ); }
sal_Bool IsLocked() const { return m_Locks != 0; }
// access control
diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx
index d24768ab0973..9601d5f3bf6d 100644
--- a/svx/source/sdr/overlay/overlaymanager.cxx
+++ b/svx/source/sdr/overlay/overlaymanager.cxx
@@ -397,12 +397,12 @@ namespace sdr
oslInterlockedCount OverlayManager::acquire()
{
- return osl_incrementInterlockedCount( &mnRefCount );
+ return osl_atomic_increment( &mnRefCount );
}
oslInterlockedCount OverlayManager::release()
{
- oslInterlockedCount nCount( osl_decrementInterlockedCount( &mnRefCount ) );
+ oslInterlockedCount nCount( osl_atomic_decrement( &mnRefCount ) );
if ( nCount == 0 )
delete this;
return nCount;
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 4aea0edf4e7e..13398726d1c7 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -377,11 +377,11 @@ void SvxShape::impl_initFromSdrObject()
if ( !mpObj.is() )
return;
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
mpObj->setUnoShape(*this);
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
mpModel = mpObj->GetModel();
diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx
index 1c4508116cfe..1b1cd895fa1f 100644
--- a/svx/source/unodraw/unoshcol.cxx
+++ b/svx/source/unodraw/unoshcol.cxx
@@ -67,7 +67,7 @@ void SvxShapeCollection::release() throw()
uno::Reference< uno::XInterface > x( xDelegator );
if (! x.is())
{
- if (osl_decrementInterlockedCount( &m_refCount ) == 0)
+ if (osl_atomic_decrement( &m_refCount ) == 0)
{
if (! mrBHelper.bDisposed)
{
@@ -89,7 +89,7 @@ void SvxShapeCollection::release() throw()
}
}
// restore the reference count
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
}
OWeakAggObject::release();
}
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index f12a7630289c..c1e3110bbfad 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -285,14 +285,14 @@ const SvxUnoTextRangeBaseList& SvxTextEditSourceImpl::getRanges() const
void SAL_CALL SvxTextEditSourceImpl::acquire()
{
- osl_incrementInterlockedCount( &maRefCount );
+ osl_atomic_increment( &maRefCount );
}
//------------------------------------------------------------------------
void SAL_CALL SvxTextEditSourceImpl::release()
{
- if( ! osl_decrementInterlockedCount( &maRefCount ) )
+ if( ! osl_atomic_decrement( &maRefCount ) )
delete this;
}
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 );
}
//--------------------------------------------------------------------
diff --git a/testtools/source/performance/pseudo.cxx b/testtools/source/performance/pseudo.cxx
index c97f6b4b9aa2..cb41a7ca0a09 100644
--- a/testtools/source/performance/pseudo.cxx
+++ b/testtools/source/performance/pseudo.cxx
@@ -102,7 +102,7 @@ static void SAL_CALL pseudo_unoInterfaceProxy_free( uno_ExtEnvironment * pEnv, v
//--------------------------------------------------------------------------------------------------
static void SAL_CALL pseudo_unoInterfaceProxy_acquire( uno_Interface * pUnoI )
{
- if (1 == osl_incrementInterlockedCount( &static_cast< pseudo_unoInterfaceProxy * >( pUnoI )->nRef ))
+ if (1 == osl_atomic_increment( &static_cast< pseudo_unoInterfaceProxy * >( pUnoI )->nRef ))
{
// rebirth of proxy zombie
// register at uno env
@@ -118,7 +118,7 @@ static void SAL_CALL pseudo_unoInterfaceProxy_acquire( uno_Interface * pUnoI )
//--------------------------------------------------------------------------------------------------
static void SAL_CALL pseudo_unoInterfaceProxy_release( uno_Interface * pUnoI )
{
- if (! osl_decrementInterlockedCount( & static_cast< pseudo_unoInterfaceProxy * >( pUnoI )->nRef ))
+ if (! osl_atomic_decrement( & static_cast< pseudo_unoInterfaceProxy * >( pUnoI )->nRef ))
{
// revoke from uno env on last release
(*static_cast< pseudo_unoInterfaceProxy * >( pUnoI )->pPseudoMapping->pTo->revokeInterface)(
@@ -198,7 +198,7 @@ static void SAL_CALL pseudo_Mapping_free( uno_Mapping * pMapping )
//--------------------------------------------------------------------------------------------------
static void SAL_CALL pseudo_Mapping_acquire( uno_Mapping * pMapping )
{
- if (1 == osl_incrementInterlockedCount( & static_cast< pseudo_Mapping * >( pMapping )->nRef ))
+ if (1 == osl_atomic_increment( & static_cast< pseudo_Mapping * >( pMapping )->nRef ))
{
OUString aMappingPurpose( RTL_CONSTASCII_USTRINGPARAM("pseudo") );
uno_registerMapping( &pMapping,
@@ -211,7 +211,7 @@ static void SAL_CALL pseudo_Mapping_acquire( uno_Mapping * pMapping )
//--------------------------------------------------------------------------------------------------
static void SAL_CALL pseudo_Mapping_release( uno_Mapping * pMapping )
{
- if (! osl_decrementInterlockedCount( & static_cast< pseudo_Mapping * >( pMapping )->nRef ))
+ if (! osl_atomic_decrement( & static_cast< pseudo_Mapping * >( pMapping )->nRef ))
{
uno_revokeMapping( pMapping );
}
diff --git a/testtools/source/performance/ubobject.cxx b/testtools/source/performance/ubobject.cxx
index 23c165c9a1a3..67d67ba950aa 100644
--- a/testtools/source/performance/ubobject.cxx
+++ b/testtools/source/performance/ubobject.cxx
@@ -104,9 +104,9 @@ public:
return aRet;
}
virtual void SAL_CALL acquire() throw()
- { osl_incrementInterlockedCount( &_nRef ); }
+ { osl_atomic_increment( &_nRef ); }
virtual void SAL_CALL release() throw()
- { if (! osl_decrementInterlockedCount( &_nRef )) delete this; }
+ { if (! osl_atomic_decrement( &_nRef )) delete this; }
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw (RuntimeException);
diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx
index 93c8f1768821..a1dbc6e21c1c 100644
--- a/toolkit/source/controls/formattedcontrol.cxx
+++ b/toolkit/source/controls/formattedcontrol.cxx
@@ -101,14 +101,14 @@ namespace toolkit
// ...............................................................
void lcl_registerDefaultFormatsClient()
{
- osl_incrementInterlockedCount( &s_refCount );
+ osl_atomic_increment( &s_refCount );
}
// ...............................................................
void lcl_revokeDefaultFormatsClient()
{
::osl::ClearableMutexGuard aGuard( getDefaultFormatsMutex() );
- if ( 0 == osl_decrementInterlockedCount( &s_refCount ) )
+ if ( 0 == osl_atomic_decrement( &s_refCount ) )
{
Reference< XNumberFormatsSupplier >& rDefaultFormats( lcl_getDefaultFormatsAccess_nothrow() );
Reference< XNumberFormatsSupplier > xReleasePotentialLastReference( rDefaultFormats );
diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx
index 7efcbb10d0c2..72d0593f21c6 100644
--- a/toolkit/source/controls/grid/gridcontrol.cxx
+++ b/toolkit/source/controls/grid/gridcontrol.cxx
@@ -122,7 +122,7 @@ UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun::
UnoGridModel::UnoGridModel( const UnoGridModel& rModel )
:UnoControlModel( rModel )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
Reference< XGridDataModel > xDataModel;
// clone the data model
@@ -160,7 +160,7 @@ UnoGridModel::UnoGridModel( const UnoGridModel& rModel )
UnoControlModel::setFastPropertyValue_NoBroadcast( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( xColumnModel ) );
// same comment as above: do not use our own setPropertyValue here.
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//----------------------------------------------------------------------------------------------------------------------
diff --git a/toolkit/source/controls/spinningprogress.cxx b/toolkit/source/controls/spinningprogress.cxx
index ecc038ed733c..b49d8493156c 100644
--- a/toolkit/source/controls/spinningprogress.cxx
+++ b/toolkit/source/controls/spinningprogress.cxx
@@ -64,7 +64,7 @@ namespace toolkit
:SpinningProgressControlModel_Base( i_factory )
{
// default image sets
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
try
{
@@ -84,7 +84,7 @@ namespace toolkit
DBG_UNHANDLED_EXCEPTION();
}
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 7fa01019de49..03089bd28147 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -648,13 +648,13 @@ UnoControlButtonModel::UnoControlButtonModel( const Reference< XMultiServiceFact
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXButton );
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
setFastPropertyValue_NoBroadcast( BASEPROPERTY_IMAGEPOSITION, ImplGetDefaultValue( BASEPROPERTY_IMAGEPOSITION ) );
// this ensures that our ImagePosition is consistent with our ImageAlign property (since both
// defaults are not per se consistent), since both are coupled in setFastPropertyValue_NoBroadcast
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
::rtl::OUString UnoControlButtonModel::getServiceName() throw(::com::sun::star::uno::RuntimeException)
diff --git a/toolkit/source/helper/accessibilityclient.cxx b/toolkit/source/helper/accessibilityclient.cxx
index 349eb36c5c85..14fb13fae872 100644
--- a/toolkit/source/helper/accessibilityclient.cxx
+++ b/toolkit/source/helper/accessibilityclient.cxx
@@ -163,13 +163,13 @@ namespace toolkit
//--------------------------------------------------------------------
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;
@@ -197,7 +197,7 @@ namespace toolkit
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
#ifdef UNLOAD_ON_LAST_CLIENT_DYING
- if ( 1 == osl_incrementInterlockedCount( &s_nAccessibilityClients ) )
+ if ( 1 == osl_atomic_increment( &s_nAccessibilityClients ) )
{ // the first client
#endif // UNLOAD_ON_LAST_CLIENT_DYING
// load the library implementing the factory
@@ -247,7 +247,7 @@ namespace toolkit
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
#ifdef UNLOAD_ON_LAST_CLIENT_DYING
- if( 0 == osl_decrementInterlockedCount( &s_nAccessibilityClients ) )
+ if( 0 == osl_atomic_decrement( &s_nAccessibilityClients ) )
{
s_pFactory = NULL;
s_pAccessibleFactoryFunc = NULL;
diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
index ce097039415c..83c2f3260c5c 100644
--- a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
@@ -117,18 +117,18 @@ Storage::Storage( const uno::Reference< lang::XMultiServiceFactory > & xSMgr,
if ( m_xAggProxy.is() )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
// Solaris compiler problem:
// Extra block to enforce destruction of temporary object created
- // in next statement _before_ osl_decrementInterlockedCount is
+ // in next statement _before_ osl_atomic_decrement is
// called. Otherwise 'this' will destroy itself even before ctor
// is completed (See impl. of XInterface::release())!
m_xAggProxy->setDelegator(
static_cast< cppu::OWeakObject * >( this ) );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
}
@@ -186,7 +186,7 @@ uno::Any SAL_CALL Storage::queryInterface( const uno::Type& aType )
void SAL_CALL Storage::acquire()
throw ()
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
}
//=========================================================================
@@ -194,7 +194,7 @@ void SAL_CALL Storage::acquire()
void SAL_CALL Storage::release()
throw ()
{
- if ( osl_decrementInterlockedCount( &m_refCount ) == 0 )
+ if ( osl_atomic_decrement( &m_refCount ) == 0 )
{
m_xFactory->releaseElement( this );
delete this;
@@ -626,18 +626,18 @@ OutputStream::OutputStream(
if ( m_xAggProxy.is() )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
// Solaris compiler problem:
// Extra block to enforce destruction of temporary object created
- // in next statement _before_ osl_decrementInterlockedCount is
+ // in next statement _before_ osl_atomic_decrement is
// called. Otherwise 'this' will destroy itself even before ctor
// is completed (See impl. of XInterface::release())!
m_xAggProxy->setDelegator(
static_cast< cppu::OWeakObject * >( this ) );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
}
@@ -827,18 +827,18 @@ Stream::Stream(
if ( m_xAggProxy.is() )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
{
// Solaris compiler problem:
// Extra block to enforce destruction of temporary object created
- // in next statement _before_ osl_decrementInterlockedCount is
+ // in next statement _before_ osl_atomic_decrement is
// called. Otherwise 'this' will destroy itself even before ctor
// is completed (See impl. of XInterface::release())!
m_xAggProxy->setDelegator(
static_cast< cppu::OWeakObject * >( this ) );
}
- osl_decrementInterlockedCount( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
}
diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx
index ca2a8ce7eca6..30deb334074f 100644
--- a/ucb/source/ucp/tdoc/tdoc_storage.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx
@@ -204,15 +204,15 @@ StorageElementFactory::createStorage( const rtl::OUString & rUri,
xElement.release();
return aIt->second;
}
- else if ( osl_incrementInterlockedCount( &aIt->second->m_refCount ) > 1 )
+ else if ( osl_atomic_increment( &aIt->second->m_refCount ) > 1 )
{
rtl::Reference< Storage > xElement( aIt->second );
- osl_decrementInterlockedCount( &aIt->second->m_refCount );
+ osl_atomic_decrement( &aIt->second->m_refCount );
return aIt->second;
}
else
{
- osl_decrementInterlockedCount( &aIt->second->m_refCount );
+ osl_atomic_decrement( &aIt->second->m_refCount );
aIt->second->m_aContainerIt = m_aMap.end();
uno::Reference< embed::XStorage > xParentStorage;
diff --git a/ucb/source/ucp/webdav/DAVSession.hxx b/ucb/source/ucp/webdav/DAVSession.hxx
index bd854ff7831c..120879d91bf8 100644
--- a/ucb/source/ucp/webdav/DAVSession.hxx
+++ b/ucb/source/ucp/webdav/DAVSession.hxx
@@ -56,12 +56,12 @@ class DAVSession
public:
inline void acquire() SAL_THROW(())
{
- osl_incrementInterlockedCount( &m_nRefCount );
+ osl_atomic_increment( &m_nRefCount );
}
void release() SAL_THROW(())
{
- if ( osl_decrementInterlockedCount( &m_nRefCount ) == 0 )
+ if ( osl_atomic_decrement( &m_nRefCount ) == 0 )
{
m_xFactory->releaseElement( this );
delete this;
diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.cxx b/ucb/source/ucp/webdav/DAVSessionFactory.cxx
index 41e19ae1b22f..661799ae58d8 100644
--- a/ucb/source/ucp/webdav/DAVSessionFactory.cxx
+++ b/ucb/source/ucp/webdav/DAVSessionFactory.cxx
@@ -74,15 +74,15 @@ rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession(
xElement.release();
return aIt->second;
}
- else if ( osl_incrementInterlockedCount( &aIt->second->m_nRefCount ) > 1 )
+ else if ( osl_atomic_increment( &aIt->second->m_nRefCount ) > 1 )
{
rtl::Reference< DAVSession > xElement( aIt->second );
- osl_decrementInterlockedCount( &aIt->second->m_nRefCount );
+ osl_atomic_decrement( &aIt->second->m_nRefCount );
return xElement;
}
else
{
- osl_decrementInterlockedCount( &aIt->second->m_nRefCount );
+ osl_atomic_decrement( &aIt->second->m_nRefCount );
aIt->second->m_aContainerIt = m_aMap.end();
// If URL scheme is different from http or https we definitely
diff --git a/ucb/workben/cachemap/cachemapobject1.cxx b/ucb/workben/cachemap/cachemapobject1.cxx
index fdd05c5d8c0f..7e5b5b4ff836 100644
--- a/ucb/workben/cachemap/cachemapobject1.cxx
+++ b/ucb/workben/cachemap/cachemapobject1.cxx
@@ -46,7 +46,7 @@ void ObjectContainer1::releaseElement(Object1 * pElement) SAL_THROW(())
bool bDelete = false;
{
osl::MutexGuard aGuard(m_aMutex);
- if (osl_decrementInterlockedCount(&pElement->m_nRefCount) == 0)
+ if (osl_atomic_decrement(&pElement->m_nRefCount) == 0)
{
m_aMap.erase(pElement->m_aContainerIt);
bDelete = true;
diff --git a/ucb/workben/cachemap/cachemapobject1.hxx b/ucb/workben/cachemap/cachemapobject1.hxx
index 34b7e5e47662..7e20a4eaa757 100644
--- a/ucb/workben/cachemap/cachemapobject1.hxx
+++ b/ucb/workben/cachemap/cachemapobject1.hxx
@@ -58,7 +58,7 @@ class Object1
{
public:
inline void acquire() SAL_THROW(())
- { osl_incrementInterlockedCount(&m_nRefCount); }
+ { osl_atomic_increment(&m_nRefCount); }
inline void release() SAL_THROW(())
{ m_xContainer->releaseElement(this); }
diff --git a/ucb/workben/cachemap/cachemapobject3.cxx b/ucb/workben/cachemap/cachemapobject3.cxx
index b7cb5552b402..7ecd50a9ff60 100644
--- a/ucb/workben/cachemap/cachemapobject3.cxx
+++ b/ucb/workben/cachemap/cachemapobject3.cxx
@@ -42,7 +42,7 @@ inline Object3::~Object3() SAL_THROW(())
void Object3::release() SAL_THROW(())
{
- if (osl_decrementInterlockedCount(&m_nRefCount) == 0)
+ if (osl_atomic_decrement(&m_nRefCount) == 0)
{
m_xContainer->releaseElement(this);
delete this;
@@ -75,15 +75,15 @@ rtl::Reference< Object3 > ObjectContainer3::get(rtl::OUString const & rKey)
xElement.release();
return aIt->second;
}
- else if (osl_incrementInterlockedCount(&aIt->second->m_nRefCount) > 1)
+ else if (osl_atomic_increment(&aIt->second->m_nRefCount) > 1)
{
rtl::Reference< Object3 > xElement(aIt->second);
- osl_decrementInterlockedCount(&aIt->second->m_nRefCount);
+ osl_atomic_decrement(&aIt->second->m_nRefCount);
return xElement;
}
else
{
- osl_decrementInterlockedCount(&aIt->second->m_nRefCount);
+ osl_atomic_decrement(&aIt->second->m_nRefCount);
aIt->second->m_aContainerIt = m_aMap.end();
aIt->second = new Object3(this);
aIt->second->m_aContainerIt = aIt;
diff --git a/ucb/workben/cachemap/cachemapobject3.hxx b/ucb/workben/cachemap/cachemapobject3.hxx
index 279436d4b74d..181e18dc503b 100644
--- a/ucb/workben/cachemap/cachemapobject3.hxx
+++ b/ucb/workben/cachemap/cachemapobject3.hxx
@@ -58,7 +58,7 @@ class Object3
{
public:
inline void acquire() SAL_THROW(())
- { osl_incrementInterlockedCount(&m_nRefCount); }
+ { osl_atomic_increment(&m_nRefCount); }
void release() SAL_THROW(());
diff --git a/xmloff/inc/xmloff/uniref.hxx b/xmloff/inc/xmloff/uniref.hxx
index 2deedcf69569..808ed8212b97 100644
--- a/xmloff/inc/xmloff/uniref.hxx
+++ b/xmloff/inc/xmloff/uniref.hxx
@@ -105,8 +105,9 @@ public:
{}
virtual ~UniRefBase();
- void acquire() { osl_incrementInterlockedCount( &m_refCount ); }
+ void acquire() { osl_atomic_increment( &m_refCount ); }
void release();
+
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/xmloff/source/forms/handler/property_handler_base.cxx b/xmloff/source/forms/handler/property_handler_base.cxx
index 6dd0c8512bc2..92aeeaca38b1 100644
--- a/xmloff/source/forms/handler/property_handler_base.cxx
+++ b/xmloff/source/forms/handler/property_handler_base.cxx
@@ -20,10 +20,8 @@
#include "property_handler_base.hxx"
-//......................................................................................................................
namespace xmloff
{
-//......................................................................................................................
//==================================================================================================================
//= PropertyHandlerBase
@@ -36,20 +34,18 @@ namespace xmloff
//------------------------------------------------------------------------------------------------------------------
oslInterlockedCount SAL_CALL PropertyHandlerBase::acquire()
{
- return osl_incrementInterlockedCount( &m_refCount );
+ return osl_atomic_increment( &m_refCount );
}
//------------------------------------------------------------------------------------------------------------------
oslInterlockedCount SAL_CALL PropertyHandlerBase::release()
{
- oslInterlockedCount decremented = osl_decrementInterlockedCount( &m_refCount );
+ oslInterlockedCount decremented = osl_atomic_decrement( &m_refCount );
if ( 0 == decremented )
delete this;
return decremented;
}
-//......................................................................................................................
} // namespace xmloff
-//......................................................................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/uniref.cxx b/xmloff/source/style/uniref.cxx
index 955f63c914c5..18f85c7f4343 100644
--- a/xmloff/source/style/uniref.cxx
+++ b/xmloff/source/style/uniref.cxx
@@ -25,7 +25,7 @@ UniRefBase::~UniRefBase()
void UniRefBase::release()
{
- if( !osl_decrementInterlockedCount( &m_refCount ) )
+ if( !osl_atomic_decrement( &m_refCount ) )
delete this;
}