Kernel: wrap resource limit state into kernel state; pass ref to resource limit
This commit is contained in:
parent
13c26b4371
commit
2a411bb501
7 changed files with 51 additions and 33 deletions
|
@ -272,8 +272,8 @@ ResultStatus AppLoader_THREEDSX::Load(Kernel::SharedPtr<Kernel::Process>& proces
|
|||
process->address_mappings = default_address_mappings;
|
||||
|
||||
// Attach the default resource limit (APPLICATION) to the process
|
||||
process->resource_limit =
|
||||
Kernel::ResourceLimit::GetForCategory(Kernel::ResourceLimitCategory::APPLICATION);
|
||||
process->resource_limit = Core::System::GetInstance().Kernel().ResourceLimit().GetForCategory(
|
||||
Kernel::ResourceLimitCategory::APPLICATION);
|
||||
|
||||
process->Run(48, Kernel::DEFAULT_STACK_SIZE);
|
||||
|
||||
|
|
|
@ -401,8 +401,8 @@ ResultStatus AppLoader_ELF::Load(Kernel::SharedPtr<Kernel::Process>& process) {
|
|||
process->address_mappings = default_address_mappings;
|
||||
|
||||
// Attach the default resource limit (APPLICATION) to the process
|
||||
process->resource_limit =
|
||||
Kernel::ResourceLimit::GetForCategory(Kernel::ResourceLimitCategory::APPLICATION);
|
||||
process->resource_limit = Core::System::GetInstance().Kernel().ResourceLimit().GetForCategory(
|
||||
Kernel::ResourceLimitCategory::APPLICATION);
|
||||
|
||||
process->Run(48, Kernel::DEFAULT_STACK_SIZE);
|
||||
|
||||
|
|
|
@ -108,8 +108,9 @@ ResultStatus AppLoader_NCCH::LoadExec(Kernel::SharedPtr<Kernel::Process>& proces
|
|||
|
||||
// Attach a resource limit to the process based on the resource limit category
|
||||
process->resource_limit =
|
||||
Kernel::ResourceLimit::GetForCategory(static_cast<Kernel::ResourceLimitCategory>(
|
||||
overlay_ncch->exheader_header.arm11_system_local_caps.resource_limit_category));
|
||||
Core::System::GetInstance().Kernel().ResourceLimit().GetForCategory(
|
||||
static_cast<Kernel::ResourceLimitCategory>(
|
||||
overlay_ncch->exheader_header.arm11_system_local_caps.resource_limit_category));
|
||||
|
||||
// Set the default CPU core for this process
|
||||
process->ideal_processor =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue