diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/thread.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/thread.c b/drivers/gpu/nvgpu/common/linux/thread.c index d37b2a10..ef783bbe 100644 --- a/drivers/gpu/nvgpu/common/linux/thread.c +++ b/drivers/gpu/nvgpu/common/linux/thread.c | |||
@@ -34,9 +34,15 @@ int nvgpu_thread_create(struct nvgpu_thread *thread, | |||
34 | void nvgpu_thread_stop(struct nvgpu_thread *thread) | 34 | void nvgpu_thread_stop(struct nvgpu_thread *thread) |
35 | { | 35 | { |
36 | kthread_stop(thread->task); | 36 | kthread_stop(thread->task); |
37 | thread->task = NULL; | ||
37 | }; | 38 | }; |
38 | 39 | ||
39 | bool nvgpu_thread_should_stop(struct nvgpu_thread *thread) | 40 | bool nvgpu_thread_should_stop(struct nvgpu_thread *thread) |
40 | { | 41 | { |
41 | return kthread_should_stop(); | 42 | return kthread_should_stop(); |
42 | }; | 43 | }; |
44 | |||
45 | bool nvgpu_thread_is_running(struct nvgpu_thread *thread) | ||
46 | { | ||
47 | return thread->task != NULL; | ||
48 | }; | ||