diff options
| author | 2019-11-26 13:46:41 -0500 | |
|---|---|---|
| committer | 2019-11-26 21:53:34 -0500 | |
| commit | e58748fd802dc069e90928d12d4db9ff994a869d (patch) | |
| tree | 152c306a9a51f0ba49e2a34d1dc0db9eb2923013 /src/core/hle/kernel/thread.cpp | |
| parent | core/memory: Migrate over memory mapping functions to the new Memory class (diff) | |
| download | yuzu-e58748fd802dc069e90928d12d4db9ff994a869d.tar.gz yuzu-e58748fd802dc069e90928d12d4db9ff994a869d.tar.xz yuzu-e58748fd802dc069e90928d12d4db9ff994a869d.zip | |
core/memory: Migrate over address checking functions to the new Memory class
A fairly straightforward migration. These member functions can just be
mostly moved verbatim with minor changes. We already have the necessary
plumbing in places that they're used.
IsKernelVirtualAddress() can remain a non-member function, since it
doesn't rely on class state in any form.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 735019d96..e84e5ce0d 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -162,13 +162,13 @@ ResultVal<std::shared_ptr<Thread>> Thread::Create(KernelCore& kernel, std::strin | |||
| 162 | return ERR_INVALID_PROCESSOR_ID; | 162 | return ERR_INVALID_PROCESSOR_ID; |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | if (!Memory::IsValidVirtualAddress(owner_process, entry_point)) { | 165 | auto& system = Core::System::GetInstance(); |
| 166 | if (!system.Memory().IsValidVirtualAddress(owner_process, entry_point)) { | ||
| 166 | LOG_ERROR(Kernel_SVC, "(name={}): invalid entry {:016X}", name, entry_point); | 167 | LOG_ERROR(Kernel_SVC, "(name={}): invalid entry {:016X}", name, entry_point); |
| 167 | // TODO (bunnei): Find the correct error code to use here | 168 | // TODO (bunnei): Find the correct error code to use here |
| 168 | return RESULT_UNKNOWN; | 169 | return RESULT_UNKNOWN; |
| 169 | } | 170 | } |
| 170 | 171 | ||
| 171 | auto& system = Core::System::GetInstance(); | ||
| 172 | std::shared_ptr<Thread> thread = std::make_shared<Thread>(kernel); | 172 | std::shared_ptr<Thread> thread = std::make_shared<Thread>(kernel); |
| 173 | 173 | ||
| 174 | thread->thread_id = kernel.CreateNewThreadID(); | 174 | thread->thread_id = kernel.CreateNewThreadID(); |