]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/tracehook.h
tracehook: get_signal_to_deliver
[linux-2.6-omap-h63xx.git] / include / linux / tracehook.h
index 3548694a24db1b5d4697725cf7663e38261f5cf8..42a0d7b11959c6ce926b350b42ec08142db167d0 100644 (file)
@@ -422,4 +422,33 @@ static inline int tracehook_consider_fatal_signal(struct task_struct *task,
        return (task_ptrace(task) & PT_PTRACED) != 0;
 }
 
+/**
+ * tracehook_get_signal - deliver synthetic signal to traced task
+ * @task:              @current
+ * @regs:              task_pt_regs(@current)
+ * @info:              details of synthetic signal
+ * @return_ka:         sigaction for synthetic signal
+ *
+ * Return zero to check for a real pending signal normally.
+ * Return -1 after releasing the siglock to repeat the check.
+ * Return a signal number to induce an artifical signal delivery,
+ * setting *@info and *@return_ka to specify its details and behavior.
+ *
+ * The @return_ka->sa_handler value controls the disposition of the
+ * signal, no matter the signal number.  For %SIG_DFL, the return value
+ * is a representative signal to indicate the behavior (e.g. %SIGTERM
+ * for death, %SIGQUIT for core dump, %SIGSTOP for job control stop,
+ * %SIGTSTP for stop unless in an orphaned pgrp), but the signal number
+ * reported will be @info->si_signo instead.
+ *
+ * Called with @task->sighand->siglock held, before dequeuing pending signals.
+ */
+static inline int tracehook_get_signal(struct task_struct *task,
+                                      struct pt_regs *regs,
+                                      siginfo_t *info,
+                                      struct k_sigaction *return_ka)
+{
+       return 0;
+}
+
 #endif /* <linux/tracehook.h> */