nvgpu: pmu: cleanup init thread on destroy

In nvgpu_kill_task_pg_init(), call nvgpu_thread_join()
if the init thread is no longer running in order to
reclaim thread resources.

Bug 2452799
JIRA ESRM-437

Change-Id: Id9c67f689027f00039ac2df226ee9c28ad89dd1d
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1967983
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Peter Daifuku
2018-12-07 11:04:07 -08:00
committed by mobile promotions
parent d921afd0ce
commit ebf874c351
4 changed files with 25 additions and 1 deletions

View File

@@ -95,3 +95,8 @@ bool nvgpu_thread_is_running(struct nvgpu_thread *thread)
{
return thread->running;
}
void nvgpu_thread_join(struct nvgpu_thread *thread)
{
(void) pthread_join(thread->thread, NULL);
}