diff options
| author | 2017-09-30 14:15:09 -0400 | |
|---|---|---|
| committer | 2017-09-30 14:33:58 -0400 | |
| commit | 8c92435ded5c9c89290604a03e307c038b4d4117 (patch) | |
| tree | 89640df0ae25ef5c78b79c1d8169f5ad6c25d63b /src/core/hle/kernel/process.cpp | |
| parent | process: Support loading multiple codesets. (diff) | |
| download | yuzu-8c92435ded5c9c89290604a03e307c038b4d4117.tar.gz yuzu-8c92435ded5c9c89290604a03e307c038b4d4117.tar.xz yuzu-8c92435ded5c9c89290604a03e307c038b4d4117.zip | |
nso: Refactor and allocate .bss section.
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
| -rw-r--r-- | src/core/hle/kernel/process.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index 2b6634069..2a80c2492 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp | |||
| @@ -30,10 +30,10 @@ CodeSet::~CodeSet() {} | |||
| 30 | 30 | ||
| 31 | u32 Process::next_process_id; | 31 | u32 Process::next_process_id; |
| 32 | 32 | ||
| 33 | SharedPtr<Process> Process::Create(SharedPtr<CodeSet> code_set) { | 33 | SharedPtr<Process> Process::Create(std::string&& name) { |
| 34 | SharedPtr<Process> process(new Process); | 34 | SharedPtr<Process> process(new Process); |
| 35 | 35 | ||
| 36 | process->codeset = code_set; | 36 | process->name = std::move(name); |
| 37 | process->flags.raw = 0; | 37 | process->flags.raw = 0; |
| 38 | process->flags.memory_region.Assign(MemoryRegion::APPLICATION); | 38 | process->flags.memory_region.Assign(MemoryRegion::APPLICATION); |
| 39 | 39 | ||
| @@ -112,7 +112,7 @@ void Process::ParseKernelCaps(const u32* kernel_caps, size_t len) { | |||
| 112 | } | 112 | } |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | void Process::Run(s32 main_thread_priority, u32 stack_size) { | 115 | void Process::Run(VAddr entry_point, s32 main_thread_priority, u32 stack_size) { |
| 116 | // Allocate and map stack | 116 | // Allocate and map stack |
| 117 | vm_manager | 117 | vm_manager |
| 118 | .MapMemoryBlock(Memory::HEAP_VADDR_END - stack_size, | 118 | .MapMemoryBlock(Memory::HEAP_VADDR_END - stack_size, |
| @@ -129,7 +129,8 @@ void Process::Run(s32 main_thread_priority, u32 stack_size) { | |||
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | vm_manager.LogLayout(Log::Level::Debug); | 131 | vm_manager.LogLayout(Log::Level::Debug); |
| 132 | Kernel::SetupMainThread(codeset->entrypoint, main_thread_priority); | 132 | Kernel::SetupMainThread(entry_point, main_thread_priority); |
| 133 | } | ||
| 133 | 134 | ||
| 134 | void Process::LoadModule(SharedPtr<CodeSet> module_, VAddr base_addr) { | 135 | void Process::LoadModule(SharedPtr<CodeSet> module_, VAddr base_addr) { |
| 135 | memory_region = GetMemoryRegion(flags.memory_region); | 136 | memory_region = GetMemoryRegion(flags.memory_region); |