diff options
| author | 2019-04-02 21:40:39 -0400 | |
|---|---|---|
| committer | 2019-04-02 21:40:39 -0400 | |
| commit | e796351a0de70d75993e326b8828229416216d91 (patch) | |
| tree | 0f5b340a115a98383202f3a848987ddd3ce361b2 /src/core/hle/kernel/thread.cpp | |
| parent | Merge pull request #2313 from lioncash/reslimit (diff) | |
| parent | kernel/svc: Implement svcGetThreadList (diff) | |
| download | yuzu-e796351a0de70d75993e326b8828229416216d91.tar.gz yuzu-e796351a0de70d75993e326b8828229416216d91.tar.xz yuzu-e796351a0de70d75993e326b8828229416216d91.zip | |
Merge pull request #2270 from lioncash/plist
kernel/svc: Implement svcGetProcessList and svcGetThreadList
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index fa3ac3abc..3ec3710b2 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -62,6 +62,8 @@ void Thread::Stop() { | |||
| 62 | } | 62 | } |
| 63 | wait_objects.clear(); | 63 | wait_objects.clear(); |
| 64 | 64 | ||
| 65 | owner_process->UnregisterThread(this); | ||
| 66 | |||
| 65 | // Mark the TLS slot in the thread's page as free. | 67 | // Mark the TLS slot in the thread's page as free. |
| 66 | owner_process->FreeTLSSlot(tls_address); | 68 | owner_process->FreeTLSSlot(tls_address); |
| 67 | } | 69 | } |
| @@ -202,6 +204,8 @@ ResultVal<SharedPtr<Thread>> Thread::Create(KernelCore& kernel, std::string name | |||
| 202 | thread->scheduler->AddThread(thread); | 204 | thread->scheduler->AddThread(thread); |
| 203 | thread->tls_address = thread->owner_process->MarkNextAvailableTLSSlotAsUsed(*thread); | 205 | thread->tls_address = thread->owner_process->MarkNextAvailableTLSSlotAsUsed(*thread); |
| 204 | 206 | ||
| 207 | thread->owner_process->RegisterThread(thread.get()); | ||
| 208 | |||
| 205 | // TODO(peachum): move to ScheduleThread() when scheduler is added so selected core is used | 209 | // TODO(peachum): move to ScheduleThread() when scheduler is added so selected core is used |
| 206 | // to initialize the context | 210 | // to initialize the context |
| 207 | ResetThreadContext(thread->context, stack_top, entry_point, arg); | 211 | ResetThreadContext(thread->context, stack_top, entry_point, arg); |