kern: implement KResourceLimit

This commit is contained in:
Michael Scire
2020-02-06 05:34:38 -08:00
parent 23f5d77f37
commit 1de607c183
17 changed files with 566 additions and 22 deletions

View File

@@ -36,6 +36,16 @@ namespace ams::kern::arm64 {
static s64 GetTick() {
return GetCount();
}
void RegisterAbsoluteTask(KTimerTask *task, s64 task_time) {
KScopedDisableDispatch dd;
KScopedSpinLock lk(this->GetLock());
if (this->RegisterAbsoluteTaskImpl(task, task_time)) {
SetCompareValue(task_time);
EnableInterrupt();
}
}
private:
friend class impl::KHardwareTimerInterruptTask;
NOINLINE void DoInterruptTask();