kern: finish SvcGetInfo

This commit is contained in:
Michael Scire 2020-07-24 05:44:52 -07:00 committed by SciresM
parent fd9b986938
commit 695b82b945
4 changed files with 66 additions and 4 deletions

View file

@ -427,8 +427,18 @@ namespace ams::kern {
constexpr void SetDebugAttached() { this->debug_attached = true; }
constexpr bool IsAttachedToDebugger() const { return this->debug_attached; }
void AddCpuTime(s64 amount) {
void AddCpuTime(s32 core_id, s64 amount) {
this->cpu_time += amount;
/* TODO: Debug kernels track per-core tick counts. Should we? */
}
s64 GetCpuTime() const { return this->cpu_time; }
s64 GetCpuTime(s32 core_id) const {
MESOSPHERE_ABORT_UNLESS(0 <= core_id && core_id < static_cast<s32>(cpu::NumCores));
/* TODO: Debug kernels track per-core tick counts. Should we? */
return 0;
}
constexpr u32 GetSuspendFlags() const { return this->suspend_allowed_flags & this->suspend_request_flags; }