summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/process.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2018-10-03 18:47:57 -0400
committerGravatar Lioncash2018-10-04 00:14:15 -0400
commitbaed7e1fba99c3f1932c6a41ad1496d1b6490a5a (patch)
tree004a9784a05294531e2f3975205f856a96b1a1ef /src/core/hle/kernel/process.cpp
parentMerge pull request #1330 from raven02/tlds (diff)
downloadyuzu-baed7e1fba99c3f1932c6a41ad1496d1b6490a5a.tar.gz
yuzu-baed7e1fba99c3f1932c6a41ad1496d1b6490a5a.tar.xz
yuzu-baed7e1fba99c3f1932c6a41ad1496d1b6490a5a.zip
kernel/thread: Make all instance variables private
Many of the member variables of the thread class aren't even used outside of the class itself, so there's no need to make those variables public. This change follows in the steps of the previous changes that made other kernel types' members private. The main motivation behind this is that the Thread class will likely change in the future as emulation becomes more accurate, and letting random bits of the emulator access data members of the Thread class directly makes it a pain to shuffle around and/or modify internals. Having all data members public like this also makes it difficult to reason about certain bits of behavior without first verifying what parts of the core actually use them. Everything being public also generally follows the tendency for changes to be introduced in completely different translation units that would otherwise be better introduced as an addition to the Thread class' public interface.
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
-rw-r--r--src/core/hle/kernel/process.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp
index dc9fc8470..fb0027a71 100644
--- a/src/core/hle/kernel/process.cpp
+++ b/src/core/hle/kernel/process.cpp
@@ -144,15 +144,15 @@ void Process::PrepareForTermination() {
144 144
145 const auto stop_threads = [this](const std::vector<SharedPtr<Thread>>& thread_list) { 145 const auto stop_threads = [this](const std::vector<SharedPtr<Thread>>& thread_list) {
146 for (auto& thread : thread_list) { 146 for (auto& thread : thread_list) {
147 if (thread->owner_process != this) 147 if (thread->GetOwnerProcess() != this)
148 continue; 148 continue;
149 149
150 if (thread == GetCurrentThread()) 150 if (thread == GetCurrentThread())
151 continue; 151 continue;
152 152
153 // TODO(Subv): When are the other running/ready threads terminated? 153 // TODO(Subv): When are the other running/ready threads terminated?
154 ASSERT_MSG(thread->status == ThreadStatus::WaitSynchAny || 154 ASSERT_MSG(thread->GetStatus() == ThreadStatus::WaitSynchAny ||
155 thread->status == ThreadStatus::WaitSynchAll, 155 thread->GetStatus() == ThreadStatus::WaitSynchAll,
156 "Exiting processes with non-waiting threads is currently unimplemented"); 156 "Exiting processes with non-waiting threads is currently unimplemented");
157 157
158 thread->Stop(); 158 thread->Stop();