diff options
author | San Mehat <san@google.com> | 2010-05-06 15:37:55 -0700 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-05-23 15:43:38 -0700 |
commit | 12dd04d2eb930c5dc519f096b1501cd0346491e3 (patch) | |
tree | 571a88b1ea3604baaaf1905352ad20eb95d38db0 /include/linux/sched.h | |
parent | 96bc9717a70da31dba573aa89cf16624eefeb880 (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 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 */ |