summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2010-05-06 15:37:55 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:38:17 -0800
commit4c97b1b8baa48de5675affccd1150f3b00310d18 (patch)
treeeda5202183d4495578ff37e505d756ef5d71c025 /include
parent2e4de2be3368971f82061618a183afab336d3fae (diff)
sched: Add a generic notifier when a task struct is about to be freed
This patch adds a notifier which can be used by subsystems that may be interested in when a task has completely died and is about to have it's last resource freed. The Android lowmemory killer uses this to determine when a task it has killed has finally given up its goods. Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sched.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 41d0237fd449..5bb4dd2e4c59 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1753,6 +1753,9 @@ static inline void put_task_struct(struct task_struct *t)
extern void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st);
extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st);
+extern int task_free_register(struct notifier_block *n);
+extern int task_free_unregister(struct notifier_block *n);
+
/*
* Per process flags
*/