summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.h
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-03-03 13:02:50 -0400
committerGravatar Fernando Sahmkow2020-06-27 11:35:22 -0400
commit75e10578f12cf64bd734388ba80b5f5a46ca6133 (patch)
tree4ba3fa4053193e03407dbfdd6d9d742537406000 /src/core/hle/kernel/thread.h
parentProcess: Protect TLS region and Modules. (diff)
downloadyuzu-75e10578f12cf64bd734388ba80b5f5a46ca6133.tar.gz
yuzu-75e10578f12cf64bd734388ba80b5f5a46ca6133.tar.xz
yuzu-75e10578f12cf64bd734388ba80b5f5a46ca6133.zip
Core: Correct HLE Event Callbacks and other issues.
Diffstat (limited to 'src/core/hle/kernel/thread.h')
-rw-r--r--src/core/hle/kernel/thread.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index 04496f96e..c4c9d69ec 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -448,7 +448,7 @@ public:
448 } 448 }
449 449
450 bool HasWakeupCallback() const { 450 bool HasWakeupCallback() const {
451 return hle_callback != nullptr; 451 return wakeup_callback != nullptr;
452 } 452 }
453 453
454 bool HasHLECallback() const { 454 bool HasHLECallback() const {
@@ -456,10 +456,10 @@ public:
456 } 456 }
457 457
458 void SetWakeupCallback(WakeupCallback callback) { 458 void SetWakeupCallback(WakeupCallback callback) {
459 hle_callback = std::move(callback); 459 wakeup_callback = std::move(callback);
460 } 460 }
461 461
462 void SetHLECallback(WakeupCallback callback) { 462 void SetHLECallback(HLECallback callback) {
463 hle_callback = std::move(callback); 463 hle_callback = std::move(callback);
464 } 464 }
465 465
@@ -487,8 +487,7 @@ public:
487 */ 487 */
488 bool InvokeWakeupCallback(ThreadWakeupReason reason, std::shared_ptr<Thread> thread, 488 bool InvokeWakeupCallback(ThreadWakeupReason reason, std::shared_ptr<Thread> thread,
489 std::shared_ptr<SynchronizationObject> object, std::size_t index); 489 std::shared_ptr<SynchronizationObject> object, std::size_t index);
490 bool InvokeHLECallback(ThreadWakeupReason reason, std::shared_ptr<Thread> thread, 490 bool InvokeHLECallback(std::shared_ptr<Thread> thread);
491 std::shared_ptr<SynchronizationObject> object, std::size_t index);
492 491
493 u32 GetIdealCore() const { 492 u32 GetIdealCore() const {
494 return ideal_core; 493 return ideal_core;
@@ -622,8 +621,11 @@ private:
622 621
623 /// Callback that will be invoked when the thread is resumed from a waiting state. If the thread 622 /// Callback that will be invoked when the thread is resumed from a waiting state. If the thread
624 /// was waiting via WaitSynchronization then the object will be the last object that became 623 /// was waiting via WaitSynchronization then the object will be the last object that became
625 /// available. In case of a timeout, the object will be nullptr. 624 /// available. In case of a timeout, the object will be nullptr. DEPRECATED
626 WakeupCallback hle_callback; 625 WakeupCallback wakeup_callback;
626
627 /// Callback for HLE Events
628 HLECallback hle_callback;
627 Handle hle_time_event; 629 Handle hle_time_event;
628 630
629 Scheduler* scheduler = nullptr; 631 Scheduler* scheduler = nullptr;