Files
nearby/cpp/platform_v2/api/atomic_reference.h
T
Alexey Polyudov 6b27a508ed nearby: snapshot of cl/317978613
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
Change-Id: I4bf367877a986910bb03e1c54aa972b4bcd59942
2020-06-23 19:52:26 -07:00

27 lines
571 B
C++

#ifndef PLATFORM_V2_API_ATOMIC_REFERENCE_H_
#define PLATFORM_V2_API_ATOMIC_REFERENCE_H_
#include <cstdint>
namespace location {
namespace nearby {
namespace api {
// Type that allows 32-bit atomic reads and writes.
class AtomicUint32 {
public:
virtual ~AtomicUint32() = default;
// Atomically reads and returns stored value.
virtual std::uint32_t Get() const = 0;
// Atomically stores value.
virtual void Set(std::uint32_t value) = 0;
};
} // namespace api
} // namespace nearby
} // namespace location
#endif // PLATFORM_V2_API_ATOMIC_REFERENCE_H_