hle: kernel: Migrate to KScopedSchedulerLock.
This commit is contained in:
parent
4756cb203e
commit
ccce6cb3be
15 changed files with 92 additions and 48 deletions
|
@ -19,7 +19,7 @@ Synchronization::Synchronization(Core::System& system) : system{system} {}
|
|||
|
||||
void Synchronization::SignalObject(SynchronizationObject& obj) const {
|
||||
auto& kernel = system.Kernel();
|
||||
SchedulerLock lock(kernel);
|
||||
KScopedSchedulerLock lock(kernel);
|
||||
if (obj.IsSignaled()) {
|
||||
for (auto thread : obj.GetWaitingThreads()) {
|
||||
if (thread->GetSchedulingStatus() == ThreadSchedStatus::Paused) {
|
||||
|
@ -90,7 +90,7 @@ std::pair<ResultCode, Handle> Synchronization::WaitFor(
|
|||
}
|
||||
|
||||
{
|
||||
SchedulerLock lock(kernel);
|
||||
KScopedSchedulerLock lock(kernel);
|
||||
ResultCode signaling_result = thread->GetSignalingResult();
|
||||
SynchronizationObject* signaling_object = thread->GetSignalingObject();
|
||||
thread->SetSynchronizationObjects(nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue