ArmInterface: Delegate Exclusive monitor factory to exclusive monitor interfasce.

This commit is contained in:
Fernando Sahmkow 2020-01-26 10:28:23 -04:00
parent 4d6a86b03f
commit 450341b397
3 changed files with 24 additions and 16 deletions

View file

@ -2,10 +2,23 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#ifdef ARCHITECTURE_x86_64
#include "core/arm/dynarmic/arm_dynarmic.h"
#endif
#include "core/arm/exclusive_monitor.h"
#include "core/memory.h"
namespace Core {
ExclusiveMonitor::~ExclusiveMonitor() = default;
std::unique_ptr<Core::ExclusiveMonitor> MakeExclusiveMonitor(Memory::Memory& memory, std::size_t num_cores) {
#ifdef ARCHITECTURE_x86_64
return std::make_unique<Core::DynarmicExclusiveMonitor>(memory, num_cores);
#else
// TODO(merry): Passthrough exclusive monitor
return nullptr;
#endif
}
} // namespace Core

View file

@ -1,11 +1,17 @@
// Copyright 2018 yuzu emulator team
// Copyright 2020 yuzu emulator team
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
#include <memory>
#include "common/common_types.h"
namespace Memory {
class Memory;
}
namespace Core {
class ExclusiveMonitor {
@ -22,4 +28,6 @@ public:
virtual bool ExclusiveWrite128(std::size_t core_index, VAddr vaddr, u128 value) = 0;
};
std::unique_ptr<Core::ExclusiveMonitor> MakeExclusiveMonitor(Memory::Memory& memory, std::size_t num_cores);
} // namespace Core