summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 8a2cf8bf4..7a7f430cf 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -22,12 +22,12 @@
22 22
23namespace Kernel { 23namespace Kernel {
24 24
25ResultVal<bool> Thread::ShouldWait() { 25bool Thread::ShouldWait() {
26 return MakeResult<bool>(status != THREADSTATUS_DORMANT); 26 return status != THREADSTATUS_DORMANT;
27} 27}
28 28
29ResultVal<bool> Thread::Acquire() { 29void Thread::Acquire() {
30 return MakeResult<bool>(true); 30 _assert_msg_(Kernel, !ShouldWait(), "object unavailable!");
31} 31}
32 32
33// Lists all thread ids that aren't deleted/etc. 33// Lists all thread ids that aren't deleted/etc.
@@ -269,9 +269,7 @@ void Thread::ReleaseWaitObject(WaitObject* wait_object) {
269 269
270 // Iterate through all waiting objects to check availability... 270 // Iterate through all waiting objects to check availability...
271 for (auto itr = wait_objects.begin(); itr != wait_objects.end(); ++itr) { 271 for (auto itr = wait_objects.begin(); itr != wait_objects.end(); ++itr) {
272 auto res = (*itr)->ShouldWait(); 272 if ((*itr)->ShouldWait())
273
274 if (*res && res.Succeeded())
275 wait_all_failed = true; 273 wait_all_failed = true;
276 274
277 // The output should be the last index of wait_object 275 // The output should be the last index of wait_object