mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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>
This commit is contained in:
committed by
mobile promotions
parent
4811429307
commit
32353ab744
@@ -15,6 +15,11 @@
|
||||
|
||||
#include <linux/sched.h>
|
||||
|
||||
int nvgpu_current_tid(struct gk20a *g)
|
||||
{
|
||||
return current->pid;
|
||||
}
|
||||
|
||||
int nvgpu_current_pid(struct gk20a *g)
|
||||
{
|
||||
return current->tgid;
|
||||
|
||||
Reference in New Issue
Block a user