summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
authorGravatar Lioncash2018-12-18 22:37:01 -0500
committerGravatar Lioncash2018-12-18 22:37:03 -0500
commit8435451093b193c1a1556a9edadc5663d3372b02 (patch)
treea162bf2b2482784bb1fe69ea27bc64c9d49c3424 /src/core/hle
parentkernel/svc: Correct output parameter for svcGetProcessId (diff)
downloadyuzu-8435451093b193c1a1556a9edadc5663d3372b02.tar.gz
yuzu-8435451093b193c1a1556a9edadc5663d3372b02.tar.xz
yuzu-8435451093b193c1a1556a9edadc5663d3372b02.zip
kernel/thread: Make thread_id a 64-bit value
The kernel uses a 64-bit value for the thread ID, so we shouldn't be using a 32-bit value.
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/kernel.cpp4
-rw-r--r--src/core/hle/kernel/kernel.h2
-rw-r--r--src/core/hle/kernel/thread.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index a221734c1..2be39fb52 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -156,7 +156,7 @@ struct KernelCore::Impl {
156 // TODO(Subv): Start the process ids from 10 for now, as lower PIDs are 156 // TODO(Subv): Start the process ids from 10 for now, as lower PIDs are
157 // reserved for low-level services 157 // reserved for low-level services
158 std::atomic<u64> next_process_id{10}; 158 std::atomic<u64> next_process_id{10};
159 std::atomic<u32> next_thread_id{1}; 159 std::atomic<u64> next_thread_id{1};
160 160
161 // Lists all processes that exist in the current session. 161 // Lists all processes that exist in the current session.
162 std::vector<SharedPtr<Process>> process_list; 162 std::vector<SharedPtr<Process>> process_list;
@@ -242,7 +242,7 @@ u32 KernelCore::CreateNewObjectID() {
242 return impl->next_object_id++; 242 return impl->next_object_id++;
243} 243}
244 244
245u32 KernelCore::CreateNewThreadID() { 245u64 KernelCore::CreateNewThreadID() {
246 return impl->next_thread_id++; 246 return impl->next_thread_id++;
247} 247}
248 248
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index 4f0f2331c..58c9d108b 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -91,7 +91,7 @@ private:
91 u64 CreateNewProcessID(); 91 u64 CreateNewProcessID();
92 92
93 /// Creates a new thread ID, incrementing the internal thread ID counter. 93 /// Creates a new thread ID, incrementing the internal thread ID counter.
94 u32 CreateNewThreadID(); 94 u64 CreateNewThreadID();
95 95
96 /// Creates a timer callback handle for the given timer. 96 /// Creates a timer callback handle for the given timer.
97 ResultVal<Handle> CreateTimerCallbackHandle(const SharedPtr<Timer>& timer); 97 ResultVal<Handle> CreateTimerCallbackHandle(const SharedPtr<Timer>& timer);
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index 77aec099a..d6e7981d3 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -151,7 +151,7 @@ public:
151 * Gets the thread's thread ID 151 * Gets the thread's thread ID
152 * @return The thread's ID 152 * @return The thread's ID
153 */ 153 */
154 u32 GetThreadID() const { 154 u64 GetThreadID() const {
155 return thread_id; 155 return thread_id;
156 } 156 }
157 157
@@ -379,7 +379,7 @@ private:
379 379
380 Core::ARM_Interface::ThreadContext context{}; 380 Core::ARM_Interface::ThreadContext context{};
381 381
382 u32 thread_id = 0; 382 u64 thread_id = 0;
383 383
384 ThreadStatus status = ThreadStatus::Dormant; 384 ThreadStatus status = ThreadStatus::Dormant;
385 385