summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-12-11 14:33:48 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-12-28 13:02:09 -0500
commit32353ab744937add05253cea617f397ea3d13920 (patch)
tree0163c07d028179cf9d4fb1e492c98b6549050c39 /drivers/gpu/nvgpu/include
parent48114293077c24efa6e2df8459d0800fea5ec432 (diff)
gpu: nvgpu: Implement abstraction for finding TID
Implement abstraction for finding the thread ID of thread currently being run. This is tracked for context switch tracing. In Linux kernel this is implemented by returning PID. Change-Id: Id46a318894f9a2ff3c85d2c8ef0b02c52783f122 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1627239 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/os_sched.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/os_sched.h b/drivers/gpu/nvgpu/include/nvgpu/os_sched.h
index 61cee4ad..97dc9a57 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/os_sched.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/os_sched.h
@@ -26,6 +26,12 @@
26struct gk20a; 26struct gk20a;
27 27
28/** 28/**
29 * nvgpu_current_tid - Query the id of current thread
30 *
31 */
32int nvgpu_current_tid(struct gk20a *g);
33
34/**
29 * nvgpu_current_pid - Query the id of current process 35 * nvgpu_current_pid - Query the id of current process
30 * 36 *
31 */ 37 */