kern: Kill KCoreLocalRegion

This commit is contained in:
Michael Scire 2020-12-01 13:41:37 -08:00 committed by SciresM
parent 24d545701c
commit b0debd72a7
24 changed files with 165 additions and 334 deletions

View file

@ -56,9 +56,10 @@ namespace ams::kern {
KThread *prev_thread;
s64 last_context_switch_time;
KThread *idle_thread;
std::atomic<KThread *> current_thread;
public:
constexpr KScheduler()
: state(), is_active(false), core_id(0), prev_thread(nullptr), last_context_switch_time(0), idle_thread(nullptr)
: state(), is_active(false), core_id(0), prev_thread(nullptr), last_context_switch_time(0), idle_thread(nullptr), current_thread(nullptr)
{
this->state.needs_scheduling = true;
this->state.interrupt_task_thread_runnable = false;
@ -96,6 +97,10 @@ namespace ams::kern {
return this->prev_thread;
}
ALWAYS_INLINE KThread *GetSchedulerCurrentThread() const {
return this->current_thread;
}
ALWAYS_INLINE s64 GetLastContextSwitchTime() const {
return this->last_context_switch_time;
}