summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_thread.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-11-10 04:02:11 +0100
committerbunnei <bunneidev@gmail.com>2021-12-07 01:39:17 +0100
commitbc1399204b914608715306a8a8dbe2f201dd4365 (patch)
tree7799195284bb20b15cd6be6addea57f45364136f /src/core/hle/kernel/k_thread.h
parentcore: hle: kernel: Disable dispatch count tracking on single core. (diff)
downloadyuzu-bc1399204b914608715306a8a8dbe2f201dd4365.tar
yuzu-bc1399204b914608715306a8a8dbe2f201dd4365.tar.gz
yuzu-bc1399204b914608715306a8a8dbe2f201dd4365.tar.bz2
yuzu-bc1399204b914608715306a8a8dbe2f201dd4365.tar.lz
yuzu-bc1399204b914608715306a8a8dbe2f201dd4365.tar.xz
yuzu-bc1399204b914608715306a8a8dbe2f201dd4365.tar.zst
yuzu-bc1399204b914608715306a8a8dbe2f201dd4365.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/k_thread.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_thread.h b/src/core/hle/kernel/k_thread.h
index e4c4c877d..bea5fd84d 100644
--- a/src/core/hle/kernel/k_thread.h
+++ b/src/core/hle/kernel/k_thread.h
@@ -202,6 +202,23 @@ public:
wait_result = wait_res;
}
+ constexpr void SetSyncedIndex(s32 index) {
+ synced_index = index;
+ }
+
+ constexpr s32 GetSyncedIndex() const {
+ return synced_index;
+ }
+
+ constexpr void SetWaitResult(ResultCode wait_res) {
+ wait_result = wait_res;
+ synced_object = nullptr;
+ }
+
+ constexpr ResultCode GetWaitResult() const {
+ return wait_result;
+ }
+
[[nodiscard]] ResultCode GetWaitResult(KSynchronizationObject** out) const {
*out = synced_object;
return wait_result;
@@ -596,6 +613,15 @@ public:
address_key_value = val;
}
+ void ClearWaitQueue() {
+ sleeping_queue = nullptr;
+ }
+
+ void BeginWait(KThreadQueue* queue);
+ void NotifyAvailable(KSynchronizationObject* signaled_object, ResultCode wait_result_);
+ void EndWait(ResultCode wait_result_);
+ void CancelWait(ResultCode wait_result_, bool cancel_timer_task);
+
[[nodiscard]] bool HasWaiters() const {
return !waiter_list.empty();
}
@@ -707,6 +733,7 @@ private:
u32 address_key_value{};
u32 suspend_request_flags{};
u32 suspend_allowed_flags{};
+ s32 synced_index{};
ResultCode wait_result{ResultSuccess};
s32 base_priority{};
s32 physical_ideal_core_id{};