summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/thread.h')
-rw-r--r--src/core/hle/kernel/thread.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index bed9f714a..5fab1ab58 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -78,11 +78,16 @@ public:
78 void ResumeFromWait(); 78 void ResumeFromWait();
79 79
80 /** 80 /**
81 * Sets the output values after the thread awakens from WaitSynchronization 81 * Sets the result after the thread awakens (from either WaitSynchronization SVC)
82 * @param return_val Value returned 82 * @param result Value to set to the returned result
83 * @param out_val Value to set to the output parameter
84 */ 83 */
85 void SetReturnValue(ResultCode return_val, s32 out_val); 84 void SetWaitSynchronizationResult(ResultCode result);
85
86 /**
87 * Sets the output parameter value after the thread awakens (from WaitSynchronizationN SVC only)
88 * @param output Value to set to the output parameter
89 */
90 void SetWaitSynchronizationOutput(s32 output);
86 91
87 Core::ThreadContext context; 92 Core::ThreadContext context;
88 93
@@ -100,8 +105,9 @@ public:
100 105
101 std::vector<SharedPtr<WaitObject>> wait_objects; ///< Objects that the thread is waiting on 106 std::vector<SharedPtr<WaitObject>> wait_objects; ///< Objects that the thread is waiting on
102 107
103 VAddr wait_address; ///< If waiting on an AddressArbiter, this is the arbitration address 108 VAddr wait_address; ///< If waiting on an AddressArbiter, this is the arbitration address
104 bool wait_all; ///< True if the thread is waiting on all objects before resuming 109 bool wait_all; ///< True if the thread is waiting on all objects before resuming
110 bool wait_set_output; ///< True if the output parameter should be set on thread wakeup
105 111
106 std::string name; 112 std::string name;
107 113
@@ -134,9 +140,10 @@ void WaitCurrentThread_Sleep();
134/** 140/**
135 * Waits the current thread from a WaitSynchronization call 141 * Waits the current thread from a WaitSynchronization call
136 * @param wait_object Kernel object that we are waiting on 142 * @param wait_object Kernel object that we are waiting on
143 * @param wait_set_output If true, set the output parameter on thread wakeup (for WaitSynchronizationN only)
137 * @param wait_all If true, wait on all objects before resuming (for WaitSynchronizationN only) 144 * @param wait_all If true, wait on all objects before resuming (for WaitSynchronizationN only)
138 */ 145 */
139void WaitCurrentThread_WaitSynchronization(SharedPtr<WaitObject> wait_object, bool wait_all = false); 146void WaitCurrentThread_WaitSynchronization(SharedPtr<WaitObject> wait_object, bool wait_set_output, bool wait_all);
140 147
141/** 148/**
142 * Waits the current thread from an ArbitrateAddress call 149 * Waits the current thread from an ArbitrateAddress call