diff options
author | San Mehat <san@google.com> | 2010-05-06 15:37:55 -0700 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2013-07-01 13:40:29 -0700 |
commit | 4624fb9d2d69c2ed59cb07712e1d8693e343dce7 (patch) | |
tree | ab97f45443aabc948fe3c03dc481b751b2aacce5 /include/linux/sched.h | |
parent | 45a84f273f0502a54b877bd53f117f83de00724f (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/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 178a8d909f14..7ccfeb1e4067 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1606,6 +1606,9 @@ static inline cputime_t task_gtime(struct task_struct *t) extern void task_cputime_adjusted(struct task_struct *p, cputime_t *ut, cputime_t *st); extern void thread_group_cputime_adjusted(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 */ |