core: hle: kernel: Rename Thread to KThread.

This commit is contained in:
bunnei
2020-12-30 23:01:08 -08:00
parent df41e78205
commit c0d3aef28c
45 changed files with 271 additions and 272 deletions

View File

@ -29,7 +29,7 @@ namespace Kernel {
class KernelCore;
class Process;
class SchedulerLock;
class Thread;
class KThread;
class KScheduler final {
public:
@ -45,13 +45,13 @@ public:
/// The next two are for SingleCore Only.
/// Unload current thread before preempting core.
void Unload(Thread* thread);
void Unload(KThread* thread);
/// Reload current thread after core preemption.
void Reload(Thread* thread);
void Reload(KThread* thread);
/// Gets the current running thread
[[nodiscard]] Thread* GetCurrentThread() const;
[[nodiscard]] KThread* GetCurrentThread() const;
/// Gets the timestamp for the last context switch in ticks.
[[nodiscard]] u64 GetLastContextSwitchTicks() const;
@ -72,7 +72,7 @@ public:
return switch_fiber;
}
[[nodiscard]] u64 UpdateHighestPriorityThread(Thread* highest_thread);
[[nodiscard]] u64 UpdateHighestPriorityThread(KThread* highest_thread);
/**
* Takes a thread and moves it to the back of the it's priority list.
@ -100,13 +100,13 @@ public:
void YieldToAnyThread();
/// Notify the scheduler a thread's status has changed.
static void OnThreadStateChanged(KernelCore& kernel, Thread* thread, ThreadState old_state);
static void OnThreadStateChanged(KernelCore& kernel, KThread* thread, ThreadState old_state);
/// Notify the scheduler a thread's priority has changed.
static void OnThreadPriorityChanged(KernelCore& kernel, Thread* thread, s32 old_priority);
static void OnThreadPriorityChanged(KernelCore& kernel, KThread* thread, s32 old_priority);
/// Notify the scheduler a thread's core and/or affinity mask has changed.
static void OnThreadAffinityMaskChanged(KernelCore& kernel, Thread* thread,
static void OnThreadAffinityMaskChanged(KernelCore& kernel, KThread* thread,
const KAffinityMask& old_affinity, s32 old_core);
static bool CanSchedule(KernelCore& kernel);
@ -163,13 +163,13 @@ private:
* most recent tick count retrieved. No special arithmetic is
* applied to it.
*/
void UpdateLastContextSwitchTime(Thread* thread, Process* process);
void UpdateLastContextSwitchTime(KThread* thread, Process* process);
static void OnSwitch(void* this_scheduler);
void SwitchToCurrent();
Thread* current_thread{};
Thread* idle_thread{};
KThread* current_thread{};
KThread* idle_thread{};
std::shared_ptr<Common::Fiber> switch_fiber{};
@ -178,7 +178,7 @@ private:
bool interrupt_task_thread_runnable{};
bool should_count_idle{};
u64 idle_count{};
Thread* highest_priority_thread{};
KThread* highest_priority_thread{};
void* idle_thread_stack{};
};