summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2010-11-01 16:37:17 +0800
committerLily Zhang <r58066@freescale.com>2010-11-22 09:39:20 +0800
commit80d83542ba7bac6233187defd8c3b70c602f6285 (patch)
tree91fe9267084511a361c3b9c2bb47564cbc7b09d3 /include
parent418f10aecea02315040eba4e3efbd56782f7bfaf (diff)
Android 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 5ee397ee3bca..794b8f447d03 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1682,6 +1682,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
*/