Core/Common: Address Feedback.
This commit is contained in:
parent
e486c66850
commit
2f8947583f
21 changed files with 58 additions and 58 deletions
|
@ -472,16 +472,12 @@ const Core::ExclusiveMonitor& KernelCore::GetExclusiveMonitor() const {
|
|||
}
|
||||
|
||||
void KernelCore::InvalidateAllInstructionCaches() {
|
||||
if (!IsMulticore()) {
|
||||
auto& threads = GlobalScheduler().GetThreadList();
|
||||
for (auto& thread : threads) {
|
||||
if (!thread->IsHLEThread()) {
|
||||
auto& arm_interface = thread->ArmInterface();
|
||||
arm_interface.ClearInstructionCache();
|
||||
}
|
||||
auto& threads = GlobalScheduler().GetThreadList();
|
||||
for (auto& thread : threads) {
|
||||
if (!thread->IsHLEThread()) {
|
||||
auto& arm_interface = thread->ArmInterface();
|
||||
arm_interface.ClearInstructionCache();
|
||||
}
|
||||
} else {
|
||||
UNIMPLEMENTED_MSG("Cache Invalidation unimplemented for multicore");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,10 @@ void PhysicalCore::Shutdown() {
|
|||
scheduler.Shutdown();
|
||||
}
|
||||
|
||||
bool PhysicalCore::IsInterrupted() const {
|
||||
return interrupt_handler.IsInterrupted();
|
||||
}
|
||||
|
||||
void PhysicalCore::Interrupt() {
|
||||
guard->lock();
|
||||
interrupt_handler.SetInterrupt(true);
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
#include <cstddef>
|
||||
#include <memory>
|
||||
|
||||
#include "core/arm/cpu_interrupt_handler.h"
|
||||
|
||||
namespace Common {
|
||||
class SpinLock;
|
||||
}
|
||||
|
@ -19,6 +17,7 @@ class Scheduler;
|
|||
|
||||
namespace Core {
|
||||
class ARM_Interface;
|
||||
class CPUInterruptHandler;
|
||||
class ExclusiveMonitor;
|
||||
class System;
|
||||
} // namespace Core
|
||||
|
@ -45,9 +44,7 @@ public:
|
|||
void ClearInterrupt();
|
||||
|
||||
/// Check if this core is interrupted
|
||||
bool IsInterrupted() const {
|
||||
return interrupt_handler.IsInterrupted();
|
||||
}
|
||||
bool IsInterrupted() const;
|
||||
|
||||
// Shutdown this physical core.
|
||||
void Shutdown();
|
||||
|
|
|
@ -658,7 +658,7 @@ void Scheduler::Reload() {
|
|||
cpu_core.LoadContext(thread->GetContext64());
|
||||
cpu_core.SetTlsAddress(thread->GetTLSAddress());
|
||||
cpu_core.SetTPIDR_EL0(thread->GetTPIDR_EL0());
|
||||
cpu_core.ChangeProcessorId(this->core_id);
|
||||
cpu_core.ChangeProcessorID(this->core_id);
|
||||
cpu_core.ClearExclusiveState();
|
||||
}
|
||||
}
|
||||
|
@ -691,7 +691,7 @@ void Scheduler::SwitchContextStep2() {
|
|||
cpu_core.LoadContext(new_thread->GetContext64());
|
||||
cpu_core.SetTlsAddress(new_thread->GetTLSAddress());
|
||||
cpu_core.SetTPIDR_EL0(new_thread->GetTPIDR_EL0());
|
||||
cpu_core.ChangeProcessorId(this->core_id);
|
||||
cpu_core.ChangeProcessorID(this->core_id);
|
||||
cpu_core.ClearExclusiveState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,6 +240,10 @@ public:
|
|||
return switch_fiber;
|
||||
}
|
||||
|
||||
const std::shared_ptr<Common::Fiber>& ControlContext() const {
|
||||
return switch_fiber;
|
||||
}
|
||||
|
||||
private:
|
||||
friend class GlobalScheduler;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue