mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-28 21:54:10 -04:00
kern: update scheduler for new switch count tracking logic
This commit is contained in:
parent
8176f085f1
commit
3a5f406c5f
6 changed files with 39 additions and 18 deletions
|
@ -43,6 +43,7 @@ namespace ams::kern {
|
|||
bool interrupt_task_runnable{false};
|
||||
bool should_count_idle{false};
|
||||
u64 idle_count{0};
|
||||
u64 switch_count{0};
|
||||
KThread *highest_priority_thread{nullptr};
|
||||
void *idle_thread_stack{nullptr};
|
||||
KThread *prev_thread{nullptr};
|
||||
|
@ -67,6 +68,7 @@ namespace ams::kern {
|
|||
m_state.interrupt_task_runnable = false;
|
||||
m_state.should_count_idle = false;
|
||||
m_state.idle_count = 0;
|
||||
m_state.switch_count = 0;
|
||||
m_state.idle_thread_stack = nullptr;
|
||||
m_state.highest_priority_thread = nullptr;
|
||||
m_state.prev_thread = nullptr;
|
||||
|
@ -93,6 +95,10 @@ namespace ams::kern {
|
|||
return m_state.idle_count;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE u64 GetSwitchCount() const {
|
||||
return m_state.switch_count;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE KThread *GetIdleThread() const {
|
||||
return m_idle_thread;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue