summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorGravatar Subv2017-01-01 16:53:22 -0500
committerGravatar Subv2017-01-04 15:58:45 -0500
commite6a7723f2f4b62279cd4f6d4b48eb02a9b60ffb6 (patch)
treeb56862bb64fcf57727149de90318671ffd8afe4d /src/core/hle/kernel/thread.cpp
parentKernel/Synch: Do not attempt a reschedule on every syscall. (diff)
downloadyuzu-e6a7723f2f4b62279cd4f6d4b48eb02a9b60ffb6.tar.gz
yuzu-e6a7723f2f4b62279cd4f6d4b48eb02a9b60ffb6.tar.xz
yuzu-e6a7723f2f4b62279cd4f6d4b48eb02a9b60ffb6.zip
Kernel: Object ShouldWait and Acquire calls now take a thread as a parameter.
This will be useful when implementing mutex priority inheritance.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 5fb95dada..7d03a2cf7 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -27,12 +27,12 @@ namespace Kernel {
27/// Event type for the thread wake up event 27/// Event type for the thread wake up event
28static int ThreadWakeupEventType; 28static int ThreadWakeupEventType;
29 29
30bool Thread::ShouldWait() { 30bool Thread::ShouldWait(Thread* thread) const {
31 return status != THREADSTATUS_DEAD; 31 return status != THREADSTATUS_DEAD;
32} 32}
33 33
34void Thread::Acquire() { 34void Thread::Acquire(Thread* thread) {
35 ASSERT_MSG(!ShouldWait(), "object unavailable!"); 35 ASSERT_MSG(!ShouldWait(thread), "object unavailable!");
36} 36}
37 37
38// TODO(yuriks): This can be removed if Thread objects are explicitly pooled in the future, allowing 38// TODO(yuriks): This can be removed if Thread objects are explicitly pooled in the future, allowing