Core timing 2.0 (#4913)

* Core::Timing: Add multiple timer, one for each core

* revert clang-format; work on tests for CoreTiming

* Kernel:: Add support for multiple cores, asserts in HandleSyncRequest because Thread->status == WaitIPC

* Add some TRACE_LOGs

* fix tests

* make some adjustments to qt-debugger, cheats and gdbstub(probably still broken)

* Make ARM_Interface::id private, rework ARM_Interface ctor

* ReRename TimingManager to Timing for smaler diff

* addressed review comments
This commit is contained in:
Ben 2020-02-21 19:31:32 +01:00 committed by GitHub
parent e3dbdcbdff
commit 55ec7031cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 760 additions and 535 deletions

View file

@ -9,10 +9,13 @@
#include "common/common_types.h"
#include "core/arm/skyeye_common/arm_regformat.h"
#include "core/arm/skyeye_common/vfp/asm_vfp.h"
#include "core/core_timing.h"
/// Generic ARM11 CPU interface
class ARM_Interface : NonCopyable {
public:
explicit ARM_Interface(u32 id, std::shared_ptr<Core::Timing::Timer> timer)
: timer(timer), id(id){};
virtual ~ARM_Interface() {}
class ThreadContext {
@ -172,4 +175,18 @@ public:
/// Prepare core for thread reschedule (if needed to correctly handle state)
virtual void PrepareReschedule() = 0;
std::shared_ptr<Core::Timing::Timer> GetTimer() {
return timer;
}
u32 GetID() const {
return id;
}
protected:
std::shared_ptr<Core::Timing::Timer> timer;
private:
u32 id;
};