diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-08-25 20:32:22 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-08-25 22:46:11 +0200 |
commit | e9d64ca080ed0cf2dcb56be13bee1bffbff880fd (patch) | |
tree | fc6c94eddae8ba33c8e1731bf18e055cbf2f8ef8 /binaryurp/source/proxy.hxx | |
parent | 1584d5215cd38be1f7cf14efbfac2e08ef4a0705 (diff) |
Replace use of oslInterlockedCount with std::atomic
The assumption in using std::size_t is that every acquisition can be associated
with a unique memory location in the local address space, so the counter cannot
overflow.
Change-Id: I0d004a81d9bf52cf07d13481d9024fcc10b6db6d
Reviewed-on: https://gerrit.libreoffice.org/41580
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'binaryurp/source/proxy.hxx')
-rw-r--r-- | binaryurp/source/proxy.hxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/binaryurp/source/proxy.hxx b/binaryurp/source/proxy.hxx index 5ad8cee120dc..e8ed0fea2dad 100644 --- a/binaryurp/source/proxy.hxx +++ b/binaryurp/source/proxy.hxx @@ -22,7 +22,9 @@ #include "sal/config.h" -#include "osl/interlck.h" +#include <atomic> +#include <cstddef> + #include "rtl/ref.hxx" #include "rtl/ustring.hxx" #include "typelib/typedescription.h" @@ -78,7 +80,7 @@ private: rtl::Reference< Bridge > bridge_; OUString oid_; com::sun::star::uno::TypeDescription type_; - oslInterlockedCount references_; + std::atomic<std::size_t> references_; }; } |