diff options
author | bunnei <bunneidev@gmail.com> | 2017-09-30 20:15:09 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2017-09-30 20:33:58 +0200 |
commit | 8c92435ded5c9c89290604a03e307c038b4d4117 (patch) | |
tree | 89640df0ae25ef5c78b79c1d8169f5ad6c25d63b /src/core/hle/kernel | |
parent | process: Support loading multiple codesets. (diff) | |
download | yuzu-8c92435ded5c9c89290604a03e307c038b4d4117.tar yuzu-8c92435ded5c9c89290604a03e307c038b4d4117.tar.gz yuzu-8c92435ded5c9c89290604a03e307c038b4d4117.tar.bz2 yuzu-8c92435ded5c9c89290604a03e307c038b4d4117.tar.lz yuzu-8c92435ded5c9c89290604a03e307c038b4d4117.tar.xz yuzu-8c92435ded5c9c89290604a03e307c038b4d4117.tar.zst yuzu-8c92435ded5c9c89290604a03e307c038b4d4117.zip |
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r-- | src/core/hle/kernel/process.cpp | 9 | ||||
-rw-r--r-- | src/core/hle/kernel/process.h | 9 |
2 files changed, 10 insertions, 8 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() {} u32 Process::next_process_id; -SharedPtr<Process> Process::Create(SharedPtr<CodeSet> code_set) { +SharedPtr<Process> Process::Create(std::string&& name) { SharedPtr<Process> process(new Process); - process->codeset = code_set; + process->name = std::move(name); process->flags.raw = 0; process->flags.memory_region.Assign(MemoryRegion::APPLICATION); @@ -112,7 +112,7 @@ void Process::ParseKernelCaps(const u32* kernel_caps, size_t len) { } } -void Process::Run(s32 main_thread_priority, u32 stack_size) { +void Process::Run(VAddr entry_point, s32 main_thread_priority, u32 stack_size) { // Allocate and map stack vm_manager .MapMemoryBlock(Memory::HEAP_VADDR_END - stack_size, @@ -129,7 +129,8 @@ void Process::Run(s32 main_thread_priority, u32 stack_size) { } vm_manager.LogLayout(Log::Level::Debug); - Kernel::SetupMainThread(codeset->entrypoint, main_thread_priority); + Kernel::SetupMainThread(entry_point, main_thread_priority); +} void Process::LoadModule(SharedPtr<CodeSet> module_, VAddr base_addr) { memory_region = GetMemoryRegion(flags.memory_region); diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h index 7350c6c41..f05f2703e 100644 --- a/src/core/hle/kernel/process.h +++ b/src/core/hle/kernel/process.h @@ -93,13 +93,13 @@ private: class Process final : public Object { public: - static SharedPtr<Process> Create(SharedPtr<CodeSet> code_set); + static SharedPtr<Process> Create(std::string&& name); std::string GetTypeName() const override { return "Process"; } std::string GetName() const override { - return codeset->name; + return name; } static const HandleType HANDLE_TYPE = HandleType::Process; @@ -109,7 +109,6 @@ public: static u32 next_process_id; - SharedPtr<CodeSet> codeset; /// Resource limit descriptor for this process SharedPtr<ResourceLimit> resource_limit; @@ -138,7 +137,7 @@ public: /** * Applies address space changes and launches the process main thread. */ - void Run(s32 main_thread_priority, u32 stack_size); + void Run(VAddr entry_point, s32 main_thread_priority, u32 stack_size); void LoadModule(SharedPtr<CodeSet> module_, VAddr base_addr); @@ -166,6 +165,8 @@ public: /// This vector will grow as more pages are allocated for new threads. std::vector<std::bitset<8>> tls_slots; + std::string name; + VAddr GetLinearHeapAreaAddress() const; VAddr GetLinearHeapBase() const; VAddr GetLinearHeapLimit() const; |