mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-13 22:37:56 -05:00
hle: kernel: multicore: Replace n-JITs impl. with 4 JITs.
This commit is contained in:
@ -68,6 +68,12 @@ struct KernelCore::Impl {
|
||||
InitializeSuspendThreads();
|
||||
}
|
||||
|
||||
void InitializeCores() {
|
||||
for (auto& core : cores) {
|
||||
core.Initialize(current_process->Is64BitProcess());
|
||||
}
|
||||
}
|
||||
|
||||
void Shutdown() {
|
||||
next_object_id = 0;
|
||||
next_kernel_process_id = Process::InitialKIPIDMin;
|
||||
@ -116,7 +122,7 @@ struct KernelCore::Impl {
|
||||
Core::MakeExclusiveMonitor(system.Memory(), Core::Hardware::NUM_CPU_CORES);
|
||||
for (std::size_t i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) {
|
||||
schedulers[i] = std::make_unique<Kernel::Scheduler>(system, i);
|
||||
cores.emplace_back(system, i, *schedulers[i], interrupts[i]);
|
||||
cores.emplace_back(i, system, *schedulers[i], interrupts);
|
||||
}
|
||||
}
|
||||
|
||||
@ -181,6 +187,7 @@ struct KernelCore::Impl {
|
||||
if (process == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
const u32 core_id = GetCurrentHostThreadID();
|
||||
if (core_id < Core::Hardware::NUM_CPU_CORES) {
|
||||
system.Memory().SetCurrentPageTable(*process, core_id);
|
||||
@ -372,6 +379,10 @@ void KernelCore::Initialize() {
|
||||
impl->Initialize(*this);
|
||||
}
|
||||
|
||||
void KernelCore::InitializeCores() {
|
||||
impl->InitializeCores();
|
||||
}
|
||||
|
||||
void KernelCore::Shutdown() {
|
||||
impl->Shutdown();
|
||||
}
|
||||
@ -486,12 +497,12 @@ const Core::ExclusiveMonitor& KernelCore::GetExclusiveMonitor() const {
|
||||
}
|
||||
|
||||
void KernelCore::InvalidateAllInstructionCaches() {
|
||||
auto& threads = GlobalScheduler().GetThreadList();
|
||||
for (auto& thread : threads) {
|
||||
if (!thread->IsHLEThread()) {
|
||||
auto& arm_interface = thread->ArmInterface();
|
||||
arm_interface.ClearInstructionCache();
|
||||
if (!IsMulticore()) {
|
||||
for (auto& physical_core : impl->cores) {
|
||||
physical_core.ArmInterface().ClearInstructionCache();
|
||||
}
|
||||
} else {
|
||||
ASSERT_MSG(false, "UNIMPLEMENTED!!!!!!!!!!!");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user