2024-03-06 06:26:38 +01:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
2022-04-23 10:59:50 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2018-07-03 15:28:46 +02:00
|
|
|
|
2022-11-06 22:45:36 +01:00
|
|
|
#if defined(ARCHITECTURE_x86_64) || defined(ARCHITECTURE_arm64)
|
2023-06-13 03:34:25 +02:00
|
|
|
#include "core/arm/dynarmic/dynarmic_exclusive_monitor.h"
|
2020-01-26 15:28:23 +01:00
|
|
|
#endif
|
2018-07-03 15:28:46 +02:00
|
|
|
#include "core/arm/exclusive_monitor.h"
|
2020-01-26 15:28:23 +01:00
|
|
|
#include "core/memory.h"
|
2018-07-03 15:28:46 +02:00
|
|
|
|
2018-08-25 03:43:32 +02:00
|
|
|
namespace Core {
|
|
|
|
|
2018-07-03 15:28:46 +02:00
|
|
|
ExclusiveMonitor::~ExclusiveMonitor() = default;
|
2018-08-25 03:43:32 +02:00
|
|
|
|
2020-01-26 21:14:18 +01:00
|
|
|
std::unique_ptr<Core::ExclusiveMonitor> MakeExclusiveMonitor(Memory::Memory& memory,
|
|
|
|
std::size_t num_cores) {
|
2022-11-06 22:45:36 +01:00
|
|
|
#if defined(ARCHITECTURE_x86_64) || defined(ARCHITECTURE_arm64)
|
2020-01-26 15:28:23 +01:00
|
|
|
return std::make_unique<Core::DynarmicExclusiveMonitor>(memory, num_cores);
|
|
|
|
#else
|
|
|
|
// TODO(merry): Passthrough exclusive monitor
|
|
|
|
return nullptr;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2018-08-25 03:43:32 +02:00
|
|
|
} // namespace Core
|