diff options
| author | 2014-12-04 14:59:56 -0500 | |
|---|---|---|
| committer | 2014-12-04 14:59:56 -0500 | |
| commit | 6fac2bf0ab5fa51c6b2228d6fa64752793f38965 (patch) | |
| tree | 15d9b8e8805d0e4f1e188955da77a95d4dc6bace /src/core/hle/kernel/thread.cpp | |
| parent | Threads: Implemented a sequential thread id (diff) | |
| download | yuzu-6fac2bf0ab5fa51c6b2228d6fa64752793f38965.tar.gz yuzu-6fac2bf0ab5fa51c6b2228d6fa64752793f38965.tar.xz yuzu-6fac2bf0ab5fa51c6b2228d6fa64752793f38965.zip | |
Threads: Remove a redundant function.
Use the next_thread_id variable directly.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index ccb927381..8d65dc84d 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -81,14 +81,6 @@ static Thread* current_thread; | |||
| 81 | static const u32 INITIAL_THREAD_ID = 1; ///< The first available thread id at startup | 81 | static const u32 INITIAL_THREAD_ID = 1; ///< The first available thread id at startup |
| 82 | static u32 next_thread_id; ///< The next available thread id | 82 | static u32 next_thread_id; ///< The next available thread id |
| 83 | 83 | ||
| 84 | /** | ||
| 85 | * Gets the next available thread id and increments it | ||
| 86 | * @return Next available thread id | ||
| 87 | */ | ||
| 88 | static u32 NextThreadId() { | ||
| 89 | return next_thread_id++; | ||
| 90 | } | ||
| 91 | |||
| 92 | /// Gets the current thread | 84 | /// Gets the current thread |
| 93 | inline Thread* GetCurrentThread() { | 85 | inline Thread* GetCurrentThread() { |
| 94 | return current_thread; | 86 | return current_thread; |
| @@ -338,7 +330,7 @@ Thread* CreateThread(Handle& handle, const char* name, u32 entry_point, s32 prio | |||
| 338 | thread_queue.push_back(handle); | 330 | thread_queue.push_back(handle); |
| 339 | thread_ready_queue.prepare(priority); | 331 | thread_ready_queue.prepare(priority); |
| 340 | 332 | ||
| 341 | thread->thread_id = NextThreadId(); | 333 | thread->thread_id = next_thread_id++; |
| 342 | thread->status = THREADSTATUS_DORMANT; | 334 | thread->status = THREADSTATUS_DORMANT; |
| 343 | thread->entry_point = entry_point; | 335 | thread->entry_point = entry_point; |
| 344 | thread->stack_top = stack_top; | 336 | thread->stack_top = stack_top; |