Lines Matching refs:ptrace

609 	if (!p->ptrace &&  in reparent_leader()
645 BUG_ON((!t->ptrace) != (rcu_access_pointer(t->parent) == father)); in forget_original_parent()
646 if (likely(!t->ptrace)) in forget_original_parent()
680 if (unlikely(tsk->ptrace)) { in exit_notify()
972 eligible_child(struct wait_opts *wo, bool ptrace, struct task_struct *p) in eligible_child() argument
981 if (ptrace || (wo->wo_flags & __WALL)) in eligible_child()
1133 static int *task_stopped_code(struct task_struct *p, bool ptrace) in task_stopped_code() argument
1135 if (ptrace) { in task_stopped_code()
1164 int ptrace, struct task_struct *p) in wait_task_stopped() argument
1174 if (!ptrace && !(wo->wo_flags & WUNTRACED)) in wait_task_stopped()
1177 if (!task_stopped_code(p, ptrace)) in wait_task_stopped()
1183 p_code = task_stopped_code(p, ptrace); in wait_task_stopped()
1209 why = ptrace ? CLD_TRAPPED : CLD_STOPPED; in wait_task_stopped()
1287 static int wait_consider_task(struct wait_opts *wo, int ptrace, in wait_consider_task() argument
1301 ret = eligible_child(wo, ptrace, p); in wait_consider_task()
1310 if (likely(!ptrace)) in wait_consider_task()
1315 if (likely(!ptrace) && unlikely(p->ptrace)) { in wait_consider_task()
1328 ptrace = 1; in wait_consider_task()
1340 if (unlikely(ptrace) || likely(!p->ptrace)) in wait_consider_task()
1364 if (likely(!ptrace) || (wo->wo_flags & (WCONTINUED | WEXITED))) in wait_consider_task()
1378 ret = wait_task_stopped(wo, ptrace, p); in wait_consider_task()
1449 static bool is_effectively_child(struct wait_opts *wo, bool ptrace, in is_effectively_child() argument
1453 !ptrace ? target->real_parent : target->parent; in is_effectively_child()
1465 bool ptrace; in do_wait_pid() local
1469 ptrace = false; in do_wait_pid()
1471 if (target && is_effectively_child(wo, ptrace, target)) { in do_wait_pid()
1472 retval = wait_consider_task(wo, ptrace, target); in do_wait_pid()
1477 ptrace = true; in do_wait_pid()
1479 if (target && target->ptrace && in do_wait_pid()
1480 is_effectively_child(wo, ptrace, target)) { in do_wait_pid()
1481 retval = wait_consider_task(wo, ptrace, target); in do_wait_pid()