summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-01-18 01:51:18 +0100
committerbunnei <bunneidev@gmail.com>2022-01-21 02:08:00 +0100
commitad53dc22fde4b4227fa78088cbe30b5f5b6617ba (patch)
tree8a3c21b177302e4fed9771474a26d52c1c8a84dc /src
parenthle: kernel: KThread: Ensure dummy threads never call EndWait. (diff)
downloadyuzu-ad53dc22fde4b4227fa78088cbe30b5f5b6617ba.tar
yuzu-ad53dc22fde4b4227fa78088cbe30b5f5b6617ba.tar.gz
yuzu-ad53dc22fde4b4227fa78088cbe30b5f5b6617ba.tar.bz2
yuzu-ad53dc22fde4b4227fa78088cbe30b5f5b6617ba.tar.lz
yuzu-ad53dc22fde4b4227fa78088cbe30b5f5b6617ba.tar.xz
yuzu-ad53dc22fde4b4227fa78088cbe30b5f5b6617ba.tar.zst
yuzu-ad53dc22fde4b4227fa78088cbe30b5f5b6617ba.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/hle_ipc.h5
-rw-r--r--src/core/hle/kernel/k_server_session.cpp9
2 files changed, 2 insertions, 12 deletions
diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h
index 55e6fb9f7..754b41ff6 100644
--- a/src/core/hle/kernel/hle_ipc.h
+++ b/src/core/hle/kernel/hle_ipc.h
@@ -341,10 +341,6 @@ public:
return *thread;
}
- bool IsThreadWaiting() const {
- return is_thread_waiting;
- }
-
private:
friend class IPC::ResponseBuilder;
@@ -379,7 +375,6 @@ private:
u32 domain_offset{};
std::shared_ptr<SessionRequestManager> manager;
- bool is_thread_waiting{};
KernelCore& kernel;
Core::Memory::Memory& memory;
diff --git a/src/core/hle/kernel/k_server_session.cpp b/src/core/hle/kernel/k_server_session.cpp
index d4e4a6b06..2ea995d9a 100644
--- a/src/core/hle/kernel/k_server_session.cpp
+++ b/src/core/hle/kernel/k_server_session.cpp
@@ -171,13 +171,8 @@ ResultCode KServerSession::CompleteSyncRequest(HLERequestContext& context) {
convert_to_domain = false;
}
- // Some service requests require the thread to block
- {
- KScopedSchedulerLock lock(kernel);
- if (!context.IsThreadWaiting()) {
- context.GetThread().EndWait(result);
- }
- }
+ // The calling thread is waiting for this request to complete, so wake it up.
+ context.GetThread().EndWait(result);
return result;
}