diff options
| author | 2020-03-07 12:44:35 -0400 | |
|---|---|---|
| committer | 2020-06-27 11:35:33 -0400 | |
| commit | 83c7ba1ef700eff17f30b6c2782db77710dc322e (patch) | |
| tree | 63b5901d96afa6a823a8a14859db84d6c74a283d /src/core/hle/kernel/thread.h | |
| parent | SCC: Small corrections to CancelSynchronization (diff) | |
| download | yuzu-83c7ba1ef700eff17f30b6c2782db77710dc322e.tar.gz yuzu-83c7ba1ef700eff17f30b6c2782db77710dc322e.tar.xz yuzu-83c7ba1ef700eff17f30b6c2782db77710dc322e.zip | |
SVC: Correct SetThreadActivity.
Diffstat (limited to 'src/core/hle/kernel/thread.h')
| -rw-r--r-- | src/core/hle/kernel/thread.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index d8a983200..0a8f7bb65 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h | |||
| @@ -497,11 +497,7 @@ public: | |||
| 497 | return affinity_mask; | 497 | return affinity_mask; |
| 498 | } | 498 | } |
| 499 | 499 | ||
| 500 | ThreadActivity GetActivity() const { | 500 | ResultCode SetActivity(ThreadActivity value); |
| 501 | return activity; | ||
| 502 | } | ||
| 503 | |||
| 504 | void SetActivity(ThreadActivity value); | ||
| 505 | 501 | ||
| 506 | /// Sleeps this thread for the given amount of nanoseconds. | 502 | /// Sleeps this thread for the given amount of nanoseconds. |
| 507 | ResultCode Sleep(s64 nanoseconds); | 503 | ResultCode Sleep(s64 nanoseconds); |
| @@ -564,11 +560,22 @@ public: | |||
| 564 | is_waiting_on_sync = is_waiting; | 560 | is_waiting_on_sync = is_waiting; |
| 565 | } | 561 | } |
| 566 | 562 | ||
| 563 | bool IsPendingTermination() const { | ||
| 564 | return will_be_terminated || GetSchedulingStatus() == ThreadSchedStatus::Exited; | ||
| 565 | } | ||
| 566 | |||
| 567 | bool IsPaused() const { | ||
| 568 | return pausing_state != 0; | ||
| 569 | } | ||
| 570 | |||
| 567 | private: | 571 | private: |
| 568 | friend class GlobalScheduler; | 572 | friend class GlobalScheduler; |
| 569 | friend class Scheduler; | 573 | friend class Scheduler; |
| 570 | 574 | ||
| 571 | void SetSchedulingStatus(ThreadSchedStatus new_status); | 575 | void SetSchedulingStatus(ThreadSchedStatus new_status); |
| 576 | void AddSchedulingFlag(ThreadSchedFlags flag); | ||
| 577 | void RemoveSchedulingFlag(ThreadSchedFlags flag); | ||
| 578 | |||
| 572 | void SetCurrentPriority(u32 new_priority); | 579 | void SetCurrentPriority(u32 new_priority); |
| 573 | 580 | ||
| 574 | void AdjustSchedulingOnAffinity(u64 old_affinity_mask, s32 old_core); | 581 | void AdjustSchedulingOnAffinity(u64 old_affinity_mask, s32 old_core); |
| @@ -650,18 +657,17 @@ private: | |||
| 650 | u32 ideal_core{0xFFFFFFFF}; | 657 | u32 ideal_core{0xFFFFFFFF}; |
| 651 | u64 affinity_mask{0x1}; | 658 | u64 affinity_mask{0x1}; |
| 652 | 659 | ||
| 653 | ThreadActivity activity = ThreadActivity::Normal; | ||
| 654 | |||
| 655 | s32 ideal_core_override = -1; | 660 | s32 ideal_core_override = -1; |
| 656 | u64 affinity_mask_override = 0x1; | 661 | u64 affinity_mask_override = 0x1; |
| 657 | u32 affinity_override_count = 0; | 662 | u32 affinity_override_count = 0; |
| 658 | 663 | ||
| 659 | u32 scheduling_state = 0; | 664 | u32 scheduling_state = 0; |
| 665 | u32 pausing_state = 0; | ||
| 660 | bool is_running = false; | 666 | bool is_running = false; |
| 661 | bool is_waiting_on_sync = false; | 667 | bool is_waiting_on_sync = false; |
| 662 | bool is_sync_cancelled = false; | 668 | bool is_sync_cancelled = false; |
| 663 | 669 | ||
| 664 | bool will_be_terminated{}; | 670 | bool will_be_terminated = false; |
| 665 | 671 | ||
| 666 | std::string name; | 672 | std::string name; |
| 667 | }; | 673 | }; |