Function Report

Linux Kernel (v4.4)

Source File:kernel\pid.c Create Date:2016-01-14 10:36:25
Last Modify:2016-01-11 07:01:32 Copyright©Brick
home page Tree
Annotate the kernelChinese

Function Name:free_pid

Function:void free_pid(struct pid *pid)

Return Type:void

Parameter:

Type Parameter NameRemarks
struct pid * pid

Function description:

265  spin_lock_irqsave
266  For of i <= level
267  *is used to get the id of the struct pid, as it is seen in particular namespace. Later the struct pid is found with find_pid_ns() using the int nr and struct pid_namespace*ns. = numbers + i
268  *ns = is used to get the id of the struct pid, as it is seen in particular namespace. Later the struct pid is found with find_pid_ns() using the int nr and struct pid_namespace*ns.
269  deletes entry from hash list without re-initialization
271  Case :--nr_hashed == 2
272  Case :--nr_hashed == 1
278  Break.
279  Case :--nr_hashed == PIDNS_HASH_ADDING
281  WARN_ON
282  nr_hashed = 0
284  Case :--nr_hashed == 0
289  spin_unlock_irqrestore( &Note: disable interrupts while the pidmap_lock is held as an interrupt might come in and do read_lock(&tasklist_lock)., flags)
291  For of i <= level, free_pidmap(numbers + i)
294  Queue a preemptible-RCU callback for invocation after a grace period.
Caller
Function NameFunction description
copy_processCreate a new process
__change_pid