2018-07-03 13:28:46 +00:00
|
|
|
// Copyright 2018 yuzu emulator team
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2020-01-26 14:28:23 +00:00
|
|
|
#ifdef ARCHITECTURE_x86_64
|
2020-06-18 23:56:59 +00:00
|
|
|
#include "core/arm/dynarmic/arm_exclusive_monitor.h"
|
2020-01-26 14:28:23 +00:00
|
|
|
#endif
|
2018-07-03 13:28:46 +00:00
|
|
|
#include "core/arm/exclusive_monitor.h"
|
2020-01-26 14:28:23 +00:00
|
|
|
#include "core/memory.h"
|
2018-07-03 13:28:46 +00:00
|
|
|
|
2018-08-25 01:43:32 +00:00
|
|
|
namespace Core {
|
|
|
|
|
2018-07-03 13:28:46 +00:00
|
|
|
ExclusiveMonitor::~ExclusiveMonitor() = default;
|
2018-08-25 01:43:32 +00:00
|
|
|
|
2020-01-26 20:14:18 +00:00
|
|
|
std::unique_ptr<Core::ExclusiveMonitor> MakeExclusiveMonitor(Memory::Memory& memory,
|
|
|
|
std::size_t num_cores) {
|
2020-01-26 14:28:23 +00:00
|
|
|
#ifdef ARCHITECTURE_x86_64
|
|
|
|
return std::make_unique<Core::DynarmicExclusiveMonitor>(memory, num_cores);
|
|
|
|
#else
|
|
|
|
// TODO(merry): Passthrough exclusive monitor
|
|
|
|
return nullptr;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2018-08-25 01:43:32 +00:00
|
|
|
} // namespace Core
|