Internal change

PiperOrigin-RevId: 380080172
This commit is contained in:
hai007
2021-06-17 17:22:20 -07:00
committed by Copybara-Service
parent 5ed0903d6e
commit 78f19e26be
12 changed files with 547 additions and 32 deletions
+7 -2
View File
@@ -17,6 +17,8 @@
#include "platform/api/atomic_reference.h"
#include <atomic>
namespace location {
namespace nearby {
namespace windows {
@@ -29,11 +31,14 @@ class AtomicUint32 : public api::AtomicUint32 {
// Atomically reads and returns stored value.
// TODO(b/184975123): replace with real implementation.
std::uint32_t Get() const override { return 0; };
std::uint32_t Get() const override { return atomic_uint32_; };
// Atomically stores value.
// TODO(b/184975123): replace with real implementation.
void Set(std::uint32_t value) override {}
void Set(std::uint32_t value) override { atomic_uint32_ = value; }
private:
std::atomic_int32_t atomic_uint32_ = 0;
};
} // namespace windows