summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/process.cpp
diff options
context:
space:
mode:
authorGravatar Chloe Marcec2021-02-03 12:55:16 +1100
committerGravatar Chloe Marcec2021-02-03 12:55:16 +1100
commit2c6e94049362f592bfb578a2b078f6f3067ed0d8 (patch)
tree513aa888bfe87637e8736165b35b852de079b02f /src/core/hle/kernel/process.cpp
parentCompile error (diff)
downloadyuzu-2c6e94049362f592bfb578a2b078f6f3067ed0d8.tar.gz
yuzu-2c6e94049362f592bfb578a2b078f6f3067ed0d8.tar.xz
yuzu-2c6e94049362f592bfb578a2b078f6f3067ed0d8.zip
Simplify limitableresource names
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
-rw-r--r--src/core/hle/kernel/process.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp
index 9efcb95f3..afdb27c54 100644
--- a/src/core/hle/kernel/process.cpp
+++ b/src/core/hle/kernel/process.cpp
@@ -154,7 +154,7 @@ void Process::DecrementThreadCount() {
154} 154}
155 155
156u64 Process::GetTotalPhysicalMemoryAvailable() const { 156u64 Process::GetTotalPhysicalMemoryAvailable() const {
157 const u64 capacity{resource_limit->GetFreeValue(LimitableResource::PhysicalMemoryMax) + 157 const u64 capacity{resource_limit->GetFreeValue(LimitableResource::PhysicalMemory) +
158 page_table->GetTotalHeapSize() + GetSystemResourceSize() + image_size + 158 page_table->GetTotalHeapSize() + GetSystemResourceSize() + image_size +
159 main_thread_stack_size}; 159 main_thread_stack_size};
160 160
@@ -308,13 +308,13 @@ ResultCode Process::LoadFromMetadata(const FileSys::ProgramMetadata& metadata,
308 308
309 // Set initial resource limits 309 // Set initial resource limits
310 resource_limit->SetLimitValue( 310 resource_limit->SetLimitValue(
311 LimitableResource::PhysicalMemoryMax, 311 LimitableResource::PhysicalMemory,
312 kernel.MemoryManager().GetSize(Memory::MemoryManager::Pool::Application)); 312 kernel.MemoryManager().GetSize(Memory::MemoryManager::Pool::Application));
313 resource_limit->SetLimitValue(LimitableResource::ThreadCountMax, 608); 313 resource_limit->SetLimitValue(LimitableResource::Threads, 608);
314 resource_limit->SetLimitValue(LimitableResource::EventCountMax, 700); 314 resource_limit->SetLimitValue(LimitableResource::Events, 700);
315 resource_limit->SetLimitValue(LimitableResource::TransferMemoryCountMax, 128); 315 resource_limit->SetLimitValue(LimitableResource::TransferMemory, 128);
316 resource_limit->SetLimitValue(LimitableResource::SessionCountMax, 894); 316 resource_limit->SetLimitValue(LimitableResource::Sessions, 894);
317 ASSERT(resource_limit->Reserve(LimitableResource::PhysicalMemoryMax, code_size)); 317 ASSERT(resource_limit->Reserve(LimitableResource::PhysicalMemory, code_size));
318 318
319 // Create TLS region 319 // Create TLS region
320 tls_region_address = CreateTLSRegion(); 320 tls_region_address = CreateTLSRegion();
@@ -331,8 +331,8 @@ void Process::Run(s32 main_thread_priority, u64 stack_size) {
331 ChangeStatus(ProcessStatus::Running); 331 ChangeStatus(ProcessStatus::Running);
332 332
333 SetupMainThread(system, *this, main_thread_priority, main_thread_stack_top); 333 SetupMainThread(system, *this, main_thread_priority, main_thread_stack_top);
334 resource_limit->Reserve(LimitableResource::ThreadCountMax, 1); 334 resource_limit->Reserve(LimitableResource::Threads, 1);
335 resource_limit->Reserve(LimitableResource::PhysicalMemoryMax, main_thread_stack_size); 335 resource_limit->Reserve(LimitableResource::PhysicalMemory, main_thread_stack_size);
336} 336}
337 337
338void Process::PrepareForTermination() { 338void Process::PrepareForTermination() {