hle: kernel: Separate KScopedSchedulerLockAndSleep from k_scheduler.

This commit is contained in:
bunnei 2020-12-03 21:56:02 -08:00
parent 8d3e06349e
commit 4756cb203e
11 changed files with 72 additions and 69 deletions

View file

@ -6,6 +6,7 @@
#include "core/hle/kernel/errors.h"
#include "core/hle/kernel/handle_table.h"
#include "core/hle/kernel/k_scheduler.h"
#include "core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/synchronization.h"
#include "core/hle/kernel/synchronization_object.h"
@ -40,7 +41,7 @@ std::pair<ResultCode, Handle> Synchronization::WaitFor(
auto* const thread = kernel.CurrentScheduler()->GetCurrentThread();
Handle event_handle = InvalidHandle;
{
SchedulerLockAndSleep lock(kernel, event_handle, thread, nano_seconds);
KScopedSchedulerLockAndSleep lock(kernel, event_handle, thread, nano_seconds);
const auto itr =
std::find_if(sync_objects.begin(), sync_objects.end(),
[thread](const std::shared_ptr<SynchronizationObject>& object) {