diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-02-13 01:05:24 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-02-13 01:05:24 +0100 |
commit | ec9b6641b12aa04ae3d7782b0423037dbc1400ac (patch) | |
tree | fc563f28673dfe851cfaf665951423e0ad759025 /src/core/hle/kernel/process.cpp | |
parent | kernel: KScopedReservation implementation (diff) | |
download | yuzu-ec9b6641b12aa04ae3d7782b0423037dbc1400ac.tar yuzu-ec9b6641b12aa04ae3d7782b0423037dbc1400ac.tar.gz yuzu-ec9b6641b12aa04ae3d7782b0423037dbc1400ac.tar.bz2 yuzu-ec9b6641b12aa04ae3d7782b0423037dbc1400ac.tar.lz yuzu-ec9b6641b12aa04ae3d7782b0423037dbc1400ac.tar.xz yuzu-ec9b6641b12aa04ae3d7782b0423037dbc1400ac.tar.zst yuzu-ec9b6641b12aa04ae3d7782b0423037dbc1400ac.zip |
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
-rw-r--r-- | src/core/hle/kernel/process.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index 05e21830c..47b3ac57b 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp @@ -39,6 +39,7 @@ namespace { */ void SetupMainThread(Core::System& system, Process& owner_process, u32 priority, VAddr stack_top) { const VAddr entry_point = owner_process.PageTable().GetCodeRegionStart(); + ASSERT(owner_process.GetResourceLimit()->Reserve(LimitableResource::Threads, 1)); auto thread_res = KThread::Create(system, ThreadType::User, "main", entry_point, priority, 0, owner_process.GetIdealCoreId(), stack_top, &owner_process); @@ -279,7 +280,7 @@ ResultCode Process::LoadFromMetadata(const FileSys::ProgramMetadata& metadata, if (!memory_reservation.Succeeded()) { LOG_ERROR(Kernel, "Could not reserve process memory requirements of size {:X} bytes", code_size + system_resource_size); - return ERR_RESOURCE_LIMIT_EXCEEDED; + return ResultResourceLimitedExceeded; } // Initialize proces address space if (const ResultCode result{ |