mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 21:06:58 -05:00
hle: kernel: KServerSession: Simplify CompleteSyncRequest EndWait.
- Considering is_thread_waiting is never set, so we can remove IsThreadWaiting. - KThread::EndWait will take the scheduler lock, so we can remove the redundant lock.
This commit is contained in:
parent
5ffec69dc7
commit
ad53dc22fd
2 changed files with 2 additions and 12 deletions
|
@ -341,10 +341,6 @@ public:
|
||||||
return *thread;
|
return *thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsThreadWaiting() const {
|
|
||||||
return is_thread_waiting;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class IPC::ResponseBuilder;
|
friend class IPC::ResponseBuilder;
|
||||||
|
|
||||||
|
@ -379,7 +375,6 @@ private:
|
||||||
u32 domain_offset{};
|
u32 domain_offset{};
|
||||||
|
|
||||||
std::shared_ptr<SessionRequestManager> manager;
|
std::shared_ptr<SessionRequestManager> manager;
|
||||||
bool is_thread_waiting{};
|
|
||||||
|
|
||||||
KernelCore& kernel;
|
KernelCore& kernel;
|
||||||
Core::Memory::Memory& memory;
|
Core::Memory::Memory& memory;
|
||||||
|
|
|
@ -171,13 +171,8 @@ ResultCode KServerSession::CompleteSyncRequest(HLERequestContext& context) {
|
||||||
convert_to_domain = false;
|
convert_to_domain = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Some service requests require the thread to block
|
// The calling thread is waiting for this request to complete, so wake it up.
|
||||||
{
|
|
||||||
KScopedSchedulerLock lock(kernel);
|
|
||||||
if (!context.IsThreadWaiting()) {
|
|
||||||
context.GetThread().EndWait(result);
|
context.GetThread().EndWait(result);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue