mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
MISRA 21.2 prohibits naming functions with double underscore. So, rename __nvgpu_log_dbg() and __nvgpu_log_msg() to nvgpu_log_dbg_impl() and nvgpu_log_msg_impl(), respectively. JIRA NVGPU-3368 Change-Id: I4548820f6772875088d095539b6da92051e08653 Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2118043 GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
33 lines
902 B
C
33 lines
902 B
C
/*
|
|
* 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);
|
|
}
|