- 追加された行はこの色です。
- 削除された行はこの色です。
*参照元 [#x2f57435]
#backlinks
*説明 [#vfa2af02]
-パス: [[linux-2.6.33/kernel/pid.c]]
-FIXME: これは何?
--説明
**引数 [#nf5ecaaa]
-struct task_struct *task
--
--[[linux-2.6.33/task_struct]]
enum pid_type type
-enum pid_type type
--
--[[linux-2.6.33/pid_type]]
struct pid_namespace *ns
-struct pid_namespace *ns
--
--[[linux-2.6.33/pid_namespace]]
**返り値 [#q2c640e5]
-pid_t
--
**参考 [#h1c63243]
*実装 [#i26661d5]
pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type,
struct pid_namespace *ns)
{
pid_t nr = 0;
rcu_read_lock();
-
--[[linux-2.6.33/rcu_read_lock()]]
if (!ns)
ns = current->nsproxy->pid_ns;
-
--[[linux-2.6.33/current(global)]]
if (likely(pid_alive(task))) {
-
--[[linux-2.6.33/likely()]]
-
--[[linux-2.6.33/pid_alive()]]
if (type != PIDTYPE_PID)
task = task->group_leader;
nr = pid_nr_ns(task->pids[type].pid, ns);
-
--[[linux-2.6.33/PIDTYPE_PID]]
-
--[[linux-2.6.33/pid_nr_ns()]]
}
rcu_read_unlock();
-
--[[linux-2.6.33/rcu_read_unlock()]]
return nr;
}
EXPORT_SYMBOL(__task_pid_nr_ns);
-ライセンスに関係なくシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL()]]
*コメント [#a3d3d788]