Lines Matching defs:task
21 #include <linux/sched/task.h>
222 struct task_struct *task = current;
224 if (unlikely(!task))
227 return (u64) task->tgid << 32 | task->pid;
238 struct task_struct *task = current;
242 if (unlikely(!task))
258 struct task_struct *task = current;
260 if (unlikely(!task))
264 strscpy_pad(buf, task->comm, size);
588 struct task_struct *task = current;
598 if (unlikely(!task))
601 pidns = task_active_pid_ns(task);
610 nsdata->pid = task_pid_nr_ns(task, pidns);
611 nsdata->tgid = task_tgid_nr_ns(task, pidns);
2118 * bpf_task_acquire - Acquire a reference to a task. A task acquired by this
2121 * @p: The task on which a reference is being acquired.
2131 * bpf_task_release - Release the reference acquired on a task.
2132 * @p: The task on which a reference is being released.
2202 * task's membership of cgroup ancestry.
2203 * @task: the task to be tested
2204 * @ancestor: possible ancestor of @task's cgroup
2206 * Tests whether @task's default cgroup hierarchy is a descendant of @ancestor.
2210 __bpf_kfunc long bpf_task_under_cgroup(struct task_struct *task,
2216 ret = task_under_cgroup_hierarchy(task, ancestor);
2224 * in the root pid namespace idr. If a task is returned, it must either be
2226 * @pid: The pid of the task being looked up.