From 12dd04d2eb930c5dc519f096b1501cd0346491e3 Mon Sep 17 00:00:00 2001 From: San Mehat Date: Thu, 6 May 2010 15:37:55 -0700 Subject: 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 --- include/linux/sched.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux/sched.h') diff --git a/include/linux/sched.h b/include/linux/sched.h index 781abd137673..a7dc4032c3b1 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1724,6 +1724,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 */ -- cgit v1.2.3