mirror of
https://github.com/citra-mirror/citra.git
synced 2024-08-23 20:57:20 +02:00
Kernel/IPC: Put a thread to sleep when performing an LLE IPC request.
It will be awoken when the server replies to the request via svcReplyAndReceive.
This commit is contained in:
parent
33c5982f6d
commit
8f108367c9
@ -63,6 +63,9 @@ ResultCode ServerSession::HandleSyncRequest(SharedPtr<Thread> thread) {
|
|||||||
if (hle_handler != nullptr) {
|
if (hle_handler != nullptr) {
|
||||||
hle_handler->HandleSyncRequest(SharedPtr<ServerSession>(this));
|
hle_handler->HandleSyncRequest(SharedPtr<ServerSession>(this));
|
||||||
} else {
|
} else {
|
||||||
|
// Put the thread to sleep until the server replies, it will be awoken in
|
||||||
|
// svcReplyAndReceive.
|
||||||
|
thread->status = THREADSTATUS_WAIT_IPC;
|
||||||
// Add the thread to the list of threads that have issued a sync request with this
|
// Add the thread to the list of threads that have issued a sync request with this
|
||||||
// server.
|
// server.
|
||||||
pending_requesting_threads.push_back(std::move(thread));
|
pending_requesting_threads.push_back(std::move(thread));
|
||||||
|
@ -241,8 +241,6 @@ static ResultCode SendSyncRequest(Kernel::Handle handle) {
|
|||||||
|
|
||||||
Core::System::GetInstance().PrepareReschedule();
|
Core::System::GetInstance().PrepareReschedule();
|
||||||
|
|
||||||
// TODO(Subv): svcSendSyncRequest should put the caller thread to sleep while the server
|
|
||||||
// responds and cause a reschedule.
|
|
||||||
return session->SendSyncRequest(Kernel::GetCurrentThread());
|
return session->SendSyncRequest(Kernel::GetCurrentThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user