3
0
Fork 0
forked from suyu/suyu
suyu/src/core/arm/exclusive_monitor.h

34 lines
994 B
C++
Raw Normal View History

// Copyright 2020 yuzu emulator team
2018-07-03 15:28:46 +02:00
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
#include <memory>
2018-07-03 15:28:46 +02:00
#include "common/common_types.h"
namespace Memory {
class Memory;
}
namespace Core {
2018-07-03 15:28:46 +02:00
class ExclusiveMonitor {
public:
virtual ~ExclusiveMonitor();
virtual void SetExclusive(std::size_t core_index, VAddr addr) = 0;
2018-07-03 15:28:46 +02:00
virtual void ClearExclusive() = 0;
virtual bool ExclusiveWrite8(std::size_t core_index, VAddr vaddr, u8 value) = 0;
virtual bool ExclusiveWrite16(std::size_t core_index, VAddr vaddr, u16 value) = 0;
virtual bool ExclusiveWrite32(std::size_t core_index, VAddr vaddr, u32 value) = 0;
virtual bool ExclusiveWrite64(std::size_t core_index, VAddr vaddr, u64 value) = 0;
virtual bool ExclusiveWrite128(std::size_t core_index, VAddr vaddr, u128 value) = 0;
2018-07-03 15:28:46 +02:00
};
std::unique_ptr<Core::ExclusiveMonitor> MakeExclusiveMonitor(Memory::Memory& memory, std::size_t num_cores);
} // namespace Core