mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-16 15:47:58 -05:00
kernel: use GetCurrentProcess
This commit is contained in:
@ -328,7 +328,7 @@ u64 KScheduler::UpdateHighestPriorityThreadsImpl(KernelCore& kernel) {
|
||||
}
|
||||
|
||||
void KScheduler::SwitchThread(KThread* next_thread) {
|
||||
KProcess* const cur_process = kernel.CurrentProcess();
|
||||
KProcess* const cur_process = GetCurrentProcessPointer(kernel);
|
||||
KThread* const cur_thread = GetCurrentThreadPointer(kernel);
|
||||
|
||||
// We never want to schedule a null thread, so use the idle thread if we don't have a next.
|
||||
@ -689,11 +689,11 @@ void KScheduler::RotateScheduledQueue(KernelCore& kernel, s32 core_id, s32 prior
|
||||
void KScheduler::YieldWithoutCoreMigration(KernelCore& kernel) {
|
||||
// Validate preconditions.
|
||||
ASSERT(CanSchedule(kernel));
|
||||
ASSERT(kernel.CurrentProcess() != nullptr);
|
||||
ASSERT(GetCurrentProcessPointer(kernel) != nullptr);
|
||||
|
||||
// Get the current thread and process.
|
||||
KThread& cur_thread = GetCurrentThread(kernel);
|
||||
KProcess& cur_process = *kernel.CurrentProcess();
|
||||
KProcess& cur_process = GetCurrentProcess(kernel);
|
||||
|
||||
// If the thread's yield count matches, there's nothing for us to do.
|
||||
if (cur_thread.GetYieldScheduleCount() == cur_process.GetScheduledCount()) {
|
||||
@ -728,11 +728,11 @@ void KScheduler::YieldWithoutCoreMigration(KernelCore& kernel) {
|
||||
void KScheduler::YieldWithCoreMigration(KernelCore& kernel) {
|
||||
// Validate preconditions.
|
||||
ASSERT(CanSchedule(kernel));
|
||||
ASSERT(kernel.CurrentProcess() != nullptr);
|
||||
ASSERT(GetCurrentProcessPointer(kernel) != nullptr);
|
||||
|
||||
// Get the current thread and process.
|
||||
KThread& cur_thread = GetCurrentThread(kernel);
|
||||
KProcess& cur_process = *kernel.CurrentProcess();
|
||||
KProcess& cur_process = GetCurrentProcess(kernel);
|
||||
|
||||
// If the thread's yield count matches, there's nothing for us to do.
|
||||
if (cur_thread.GetYieldScheduleCount() == cur_process.GetScheduledCount()) {
|
||||
@ -816,11 +816,11 @@ void KScheduler::YieldWithCoreMigration(KernelCore& kernel) {
|
||||
void KScheduler::YieldToAnyThread(KernelCore& kernel) {
|
||||
// Validate preconditions.
|
||||
ASSERT(CanSchedule(kernel));
|
||||
ASSERT(kernel.CurrentProcess() != nullptr);
|
||||
ASSERT(GetCurrentProcessPointer(kernel) != nullptr);
|
||||
|
||||
// Get the current thread and process.
|
||||
KThread& cur_thread = GetCurrentThread(kernel);
|
||||
KProcess& cur_process = *kernel.CurrentProcess();
|
||||
KProcess& cur_process = GetCurrentProcess(kernel);
|
||||
|
||||
// If the thread's yield count matches, there's nothing for us to do.
|
||||
if (cur_thread.GetYieldScheduleCount() == cur_process.GetScheduledCount()) {
|
||||
|
Reference in New Issue
Block a user