diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-06-10 06:28:33 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-06-10 06:28:33 +0200 |
commit | fc0bf91a969cddeb2f84c3e7c3a862fe98f1d438 (patch) | |
tree | d0773fbb4563392af144e5caf70a2c4c7664d58c /src/core/hle/kernel/kernel.cpp | |
parent | Merge pull request #2571 from lioncash/ref (diff) | |
download | yuzu-fc0bf91a969cddeb2f84c3e7c3a862fe98f1d438.tar yuzu-fc0bf91a969cddeb2f84c3e7c3a862fe98f1d438.tar.gz yuzu-fc0bf91a969cddeb2f84c3e7c3a862fe98f1d438.tar.bz2 yuzu-fc0bf91a969cddeb2f84c3e7c3a862fe98f1d438.tar.lz yuzu-fc0bf91a969cddeb2f84c3e7c3a862fe98f1d438.tar.xz yuzu-fc0bf91a969cddeb2f84c3e7c3a862fe98f1d438.tar.zst yuzu-fc0bf91a969cddeb2f84c3e7c3a862fe98f1d438.zip |
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 757e5f21f..799e5e0d8 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -99,7 +99,8 @@ struct KernelCore::Impl { void Shutdown() { next_object_id = 0; - next_process_id = Process::ProcessIDMin; + next_kernel_process_id = Process::InitialKIPIDMin; + next_user_process_id = Process::ProcessIDMin; next_thread_id = 1; process_list.clear(); @@ -132,7 +133,8 @@ struct KernelCore::Impl { } std::atomic<u32> next_object_id{0}; - std::atomic<u64> next_process_id{Process::ProcessIDMin}; + std::atomic<u64> next_kernel_process_id{Process::InitialKIPIDMin}; + std::atomic<u64> next_user_process_id{Process::ProcessIDMin}; std::atomic<u64> next_thread_id{1}; // Lists all processes that exist in the current session. @@ -226,8 +228,12 @@ u64 KernelCore::CreateNewThreadID() { return impl->next_thread_id++; } -u64 KernelCore::CreateNewProcessID() { - return impl->next_process_id++; +u64 KernelCore::CreateNewKernelProcessID() { + return impl->next_kernel_process_id++; +} + +u64 KernelCore::CreateNewUserProcessID() { + return impl->next_user_process_id++; } Core::Timing::EventType* KernelCore::ThreadWakeupCallbackEventType() const { |