aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/k_thread.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-11-09 19:21:20 -0800
committerbunnei <bunneidev@gmail.com>2021-12-06 16:39:17 -0800
commit2f894560413db9bf8efc1febc26904937a28380f (patch)
tree7ba9a6d13f96fc531973dc2015c3c7f2469e8677 /src/core/hle/kernel/k_thread.cpp
parentbc1399204b914608715306a8a8dbe2f201dd4365 (diff)
hle: kernel: KThread: Remove tracking of sync object from threads.
Diffstat (limited to 'src/core/hle/kernel/k_thread.cpp')
-rw-r--r--src/core/hle/kernel/k_thread.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp
index 3331b4845..2c1f29bad 100644
--- a/src/core/hle/kernel/k_thread.cpp
+++ b/src/core/hle/kernel/k_thread.cpp
@@ -130,9 +130,6 @@ ResultCode KThread::Initialize(KThreadFunction func, uintptr_t arg, VAddr user_s
priority = prio;
base_priority = prio;
- // Set sync object and waiting lock to null.
- synced_object = nullptr;
-
// Initialize sleeping queue.
sleeping_queue = nullptr;
@@ -279,7 +276,7 @@ void KThread::Finalize() {
while (it != waiter_list.end()) {
// The thread shouldn't be a kernel waiter.
it->SetLockOwner(nullptr);
- it->SetSyncedObject(nullptr, ResultInvalidState);
+ it->SetWaitResult(ResultInvalidState);
it->Wakeup();
it = waiter_list.erase(it);
}
@@ -650,7 +647,7 @@ void KThread::WaitCancel() {
sleeping_queue->WakeupThread(this);
wait_cancelled = true;
} else {
- SetSyncedObject(nullptr, ResultCancelled);
+ SetWaitResult(ResultCancelled);
SetState(ThreadState::Runnable);
wait_cancelled = false;
}