mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
ANDROID: vendor_hooks: Add hooks for signal
Add hook to boost thread when process killed.
Bug: 237749933
Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I7cc6f248397021f3a8271433144a0e582ed27cfa
(cherry picked from commit 709679142d583b0b7338d931fdd43b27b1bbf9e0)
(cherry picked from commit 226f36eddd)
This commit is contained in:
committed by
Treehugger Robot
parent
bfbebce3f7
commit
bf8bbc3ff8
@@ -241,3 +241,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmap_region);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_try_to_unmap_one);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_psi_event);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_psi_group);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_exit_signal);
|
||||
|
||||
@@ -11,6 +11,9 @@ struct task_struct;
|
||||
DECLARE_HOOK(android_vh_do_send_sig_info,
|
||||
TP_PROTO(int sig, struct task_struct *killer, struct task_struct *dst),
|
||||
TP_ARGS(sig, killer, dst));
|
||||
DECLARE_HOOK(android_vh_exit_signal,
|
||||
TP_PROTO(struct task_struct *task),
|
||||
TP_ARGS(task));
|
||||
#endif /* _TRACE_HOOK_SIGNAL_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
@@ -1057,6 +1057,7 @@ static void complete_signal(int sig, struct task_struct *p, enum pid_type type)
|
||||
signal->group_stop_count = 0;
|
||||
t = p;
|
||||
do {
|
||||
trace_android_vh_exit_signal(t);
|
||||
task_clear_jobctl_pending(t, JOBCTL_PENDING_MASK);
|
||||
sigaddset(&t->pending.signal, SIGKILL);
|
||||
signal_wake_up(t, 1);
|
||||
|
||||
Reference in New Issue
Block a user