mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
Open source GPL/LGPL release
This commit is contained in:
32
drivers/gpu/nvgpu/os/linux/os_sched.c
Normal file
32
drivers/gpu/nvgpu/os/linux/os_sched.c
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*/
|
||||
|
||||
#include <nvgpu/os_sched.h>
|
||||
|
||||
#include <linux/sched.h>
|
||||
|
||||
int nvgpu_current_tid(struct gk20a *g)
|
||||
{
|
||||
return current->pid;
|
||||
}
|
||||
|
||||
int nvgpu_current_pid(struct gk20a *g)
|
||||
{
|
||||
return current->tgid;
|
||||
}
|
||||
|
||||
void nvgpu_print_current_impl(struct gk20a *g, const char *func_name, int line,
|
||||
void *ctx, enum nvgpu_log_type type)
|
||||
{
|
||||
nvgpu_log_msg_impl(g, func_name, line, type, current->comm);
|
||||
}
|
||||
Reference in New Issue
Block a user