Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\pid.c Create Date:2022-07-28 09:28:45
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__task_pid_nr_ns

Proto:pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type, struct pid_namespace *ns)

Type:pid_t

Parameter:

TypeParameterName
struct task_struct *task
enum pid_typetype
struct pid_namespace *ns
470  nr = 0
472  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
473  If Not ns Then ns = task_active_pid_ns(current process)
475  If Value is more likely to compile time(pid_alive - check that a task structure is not stale*@p: Task structure to be checked.* Test if a process is not yet dead (at most zombie state)* If pid_alive fails, then pointers within the task structure* can be stale and must not be dereferenced.) Then nr = pid_nr_ns( fetch RCU-protected pointer for dereferencing( * task_pid_ptr(task, type)), ns)
477  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
479  Return nr
Caller
NameDescribe
perf_event_pid_type
task_pid_nr_ns
task_pid_vnr
task_pgrp_nr_ns
task_pgrp_vnr
task_session_nr_ns
task_session_vnr
task_tgid_nr_ns
task_tgid_vnr