diff options
| author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2007-10-04 21:45:42 -0400 |
|---|---|---|
| committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2007-10-04 21:45:42 -0400 |
| commit | f0540715772bb427e35ba4ef96788d7dfc13e0a4 (patch) | |
| tree | c414fff098502ed2b1c3041d3fdd8c257ab75d6a | |
| parent | ffdf0e8b1c67171d3dd170a924afdf39a55811a8 (diff) | |
Wrap task teardown.
Provide a place to do generic tear-down work.
| -rw-r--r-- | include/linux/litmus.h | 3 | ||||
| -rw-r--r-- | kernel/fork.c | 2 | ||||
| -rw-r--r-- | kernel/litmus.c | 4 |
3 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/litmus.h b/include/linux/litmus.h index df8652d7ea..4753c83083 100644 --- a/include/linux/litmus.h +++ b/include/linux/litmus.h | |||
| @@ -133,4 +133,7 @@ void request_exit_np(struct task_struct *t); | |||
| 133 | */ | 133 | */ |
| 134 | void np_mem_kill(struct task_struct *t); | 134 | void np_mem_kill(struct task_struct *t); |
| 135 | 135 | ||
| 136 | /* clean up real-time state of a task */ | ||
| 137 | void exit_litmus(struct task_struct *dead_tsk); | ||
| 138 | |||
| 136 | #endif | 139 | #endif |
diff --git a/kernel/fork.c b/kernel/fork.c index 6874058d06..d786dcfe22 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
| @@ -122,7 +122,7 @@ void __put_task_struct(struct task_struct *tsk) | |||
| 122 | WARN_ON(tsk == current); | 122 | WARN_ON(tsk == current); |
| 123 | 123 | ||
| 124 | if (is_realtime(tsk)) | 124 | if (is_realtime(tsk)) |
| 125 | curr_sched_plugin->tear_down(tsk); | 125 | exit_litmus(tsk); |
| 126 | 126 | ||
| 127 | security_task_free(tsk); | 127 | security_task_free(tsk); |
| 128 | free_uid(tsk->user); | 128 | free_uid(tsk->user); |
diff --git a/kernel/litmus.c b/kernel/litmus.c index 4457d52e0f..2144a84b46 100644 --- a/kernel/litmus.c +++ b/kernel/litmus.c | |||
| @@ -524,6 +524,10 @@ asmlinkage long sys_exit_np(void) | |||
| 524 | return retval; | 524 | return retval; |
| 525 | } | 525 | } |
| 526 | 526 | ||
| 527 | void exit_litmus(struct task_struct *dead_tsk) | ||
| 528 | { | ||
| 529 | curr_sched_plugin->tear_down(dead_tsk); | ||
| 530 | } | ||
| 527 | 531 | ||
| 528 | #ifdef CONFIG_MAGIC_SYSRQ | 532 | #ifdef CONFIG_MAGIC_SYSRQ |
| 529 | /* We offer the possibility to change the real-time mode of the system | 533 | /* We offer the possibility to change the real-time mode of the system |
