aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tracehook.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/tracehook.h')
-rw-r--r--include/linux/tracehook.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
index 42a0d7b11959..6dc428dd2f38 100644
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -451,4 +451,24 @@ static inline int tracehook_get_signal(struct task_struct *task,
451 return 0; 451 return 0;
452} 452}
453 453
454/**
455 * tracehook_notify_jctl - report about job control stop/continue
456 * @notify: nonzero if this is the last thread in the group to stop
457 * @why: %CLD_STOPPED or %CLD_CONTINUED
458 *
459 * This is called when we might call do_notify_parent_cldstop().
460 * It's called when about to stop for job control; we are already in
461 * %TASK_STOPPED state, about to call schedule(). It's also called when
462 * a delayed %CLD_STOPPED or %CLD_CONTINUED report is ready to be made.
463 *
464 * Return nonzero to generate a %SIGCHLD with @why, which is
465 * normal if @notify is nonzero.
466 *
467 * Called with no locks held.
468 */
469static inline int tracehook_notify_jctl(int notify, int why)
470{
471 return notify || (current->ptrace & PT_PTRACED);
472}
473
454#endif /* <linux/tracehook.h> */ 474#endif /* <linux/tracehook.h> */