diff options
| author | 2020-12-30 23:01:08 -0800 | |
|---|---|---|
| committer | 2021-01-28 21:42:25 -0800 | |
| commit | c0d3aef28c0a0c68c18de30228f29e30f0e52533 (patch) | |
| tree | 2f94a5f6e5fec4d288272f9a476ee85a8da3d0ac /src/core/hle/kernel/process.cpp | |
| parent | Merge pull request #5837 from german77/socketstub (diff) | |
| download | yuzu-c0d3aef28c0a0c68c18de30228f29e30f0e52533.tar.gz yuzu-c0d3aef28c0a0c68c18de30228f29e30f0e52533.tar.xz yuzu-c0d3aef28c0a0c68c18de30228f29e30f0e52533.zip | |
core: hle: kernel: Rename Thread to KThread.
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
| -rw-r--r-- | src/core/hle/kernel/process.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index 37b77fa6e..ccd371aba 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp | |||
| @@ -16,13 +16,13 @@ | |||
| 16 | #include "core/hle/kernel/code_set.h" | 16 | #include "core/hle/kernel/code_set.h" |
| 17 | #include "core/hle/kernel/errors.h" | 17 | #include "core/hle/kernel/errors.h" |
| 18 | #include "core/hle/kernel/k_scheduler.h" | 18 | #include "core/hle/kernel/k_scheduler.h" |
| 19 | #include "core/hle/kernel/k_thread.h" | ||
| 19 | #include "core/hle/kernel/kernel.h" | 20 | #include "core/hle/kernel/kernel.h" |
| 20 | #include "core/hle/kernel/memory/memory_block_manager.h" | 21 | #include "core/hle/kernel/memory/memory_block_manager.h" |
| 21 | #include "core/hle/kernel/memory/page_table.h" | 22 | #include "core/hle/kernel/memory/page_table.h" |
| 22 | #include "core/hle/kernel/memory/slab_heap.h" | 23 | #include "core/hle/kernel/memory/slab_heap.h" |
| 23 | #include "core/hle/kernel/process.h" | 24 | #include "core/hle/kernel/process.h" |
| 24 | #include "core/hle/kernel/resource_limit.h" | 25 | #include "core/hle/kernel/resource_limit.h" |
| 25 | #include "core/hle/kernel/thread.h" | ||
| 26 | #include "core/hle/lock.h" | 26 | #include "core/hle/lock.h" |
| 27 | #include "core/memory.h" | 27 | #include "core/memory.h" |
| 28 | #include "core/settings.h" | 28 | #include "core/settings.h" |
| @@ -39,10 +39,10 @@ namespace { | |||
| 39 | void SetupMainThread(Core::System& system, Process& owner_process, u32 priority, VAddr stack_top) { | 39 | void SetupMainThread(Core::System& system, Process& owner_process, u32 priority, VAddr stack_top) { |
| 40 | const VAddr entry_point = owner_process.PageTable().GetCodeRegionStart(); | 40 | const VAddr entry_point = owner_process.PageTable().GetCodeRegionStart(); |
| 41 | ThreadType type = THREADTYPE_USER; | 41 | ThreadType type = THREADTYPE_USER; |
| 42 | auto thread_res = Thread::Create(system, type, "main", entry_point, priority, 0, | 42 | auto thread_res = KThread::Create(system, type, "main", entry_point, priority, 0, |
| 43 | owner_process.GetIdealCore(), stack_top, &owner_process); | 43 | owner_process.GetIdealCore(), stack_top, &owner_process); |
| 44 | 44 | ||
| 45 | std::shared_ptr<Thread> thread = std::move(thread_res).Unwrap(); | 45 | std::shared_ptr<KThread> thread = std::move(thread_res).Unwrap(); |
| 46 | 46 | ||
| 47 | // Register 1 must be a handle to the main thread | 47 | // Register 1 must be a handle to the main thread |
| 48 | const Handle thread_handle = owner_process.GetHandleTable().Create(thread).Unwrap(); | 48 | const Handle thread_handle = owner_process.GetHandleTable().Create(thread).Unwrap(); |
| @@ -162,11 +162,11 @@ u64 Process::GetTotalPhysicalMemoryUsedWithoutSystemResource() const { | |||
| 162 | return GetTotalPhysicalMemoryUsed() - GetSystemResourceUsage(); | 162 | return GetTotalPhysicalMemoryUsed() - GetSystemResourceUsage(); |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | void Process::RegisterThread(const Thread* thread) { | 165 | void Process::RegisterThread(const KThread* thread) { |
| 166 | thread_list.push_back(thread); | 166 | thread_list.push_back(thread); |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | void Process::UnregisterThread(const Thread* thread) { | 169 | void Process::UnregisterThread(const KThread* thread) { |
| 170 | thread_list.remove(thread); | 170 | thread_list.remove(thread); |
| 171 | } | 171 | } |
| 172 | 172 | ||
| @@ -267,7 +267,7 @@ void Process::Run(s32 main_thread_priority, u64 stack_size) { | |||
| 267 | void Process::PrepareForTermination() { | 267 | void Process::PrepareForTermination() { |
| 268 | ChangeStatus(ProcessStatus::Exiting); | 268 | ChangeStatus(ProcessStatus::Exiting); |
| 269 | 269 | ||
| 270 | const auto stop_threads = [this](const std::vector<std::shared_ptr<Thread>>& thread_list) { | 270 | const auto stop_threads = [this](const std::vector<std::shared_ptr<KThread>>& thread_list) { |
| 271 | for (auto& thread : thread_list) { | 271 | for (auto& thread : thread_list) { |
| 272 | if (thread->GetOwnerProcess() != this) | 272 | if (thread->GetOwnerProcess() != this) |
| 273 | continue; | 273 | continue; |