#include "mojo/public/cpp/base/shared_memory_version.h"
#include <atomic>
#include <limits>
#include "base/check_op.h"
#include "base/logging.h"
#include "base/memory/read_only_shared_memory_region.h"
#include "base/memory/structured_shared_memory.h"
namespace mojo {
SharedMemoryVersionController::SharedMemoryVersionController()
: … { … }
SharedMemoryVersionController::~SharedMemoryVersionController() = default;
base::ReadOnlySharedMemoryRegion
SharedMemoryVersionController::GetSharedMemoryRegion() const { … }
VersionType SharedMemoryVersionController::GetSharedVersion() const { … }
void SharedMemoryVersionController::Increment() { … }
void SharedMemoryVersionController::SetVersion(VersionType version) { … }
SharedMemoryVersionClient::SharedMemoryVersionClient(
base::ReadOnlySharedMemoryRegion shared_region)
: … { … }
SharedMemoryVersionClient::~SharedMemoryVersionClient() = default;
bool SharedMemoryVersionClient::SharedVersionIsLessThan(
VersionType version) const { … }
bool SharedMemoryVersionClient::SharedVersionIsGreaterThan(
VersionType version) const { … }
VersionType SharedMemoryVersionClient::GetSharedVersion() const { … }
}