aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2009-12-17 21:23:36 -0500
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-29 17:05:45 -0400
commit4b38febbd59fd33542a343991262119eb9860f5e (patch)
tree1af88a0d354abe344c2c2869631f76a1806d75c3 /kernel/fork.c
parent22763c5cf3690a681551162c15d34d935308c8d7 (diff)
[ported from 2008.3] Core LITMUS^RT infrastructure
Port 2008.3 Core LITMUS^RT infrastructure to Linux 2.6.32 litmus_sched_class implements 4 new methods: - prio_changed: void - switched_to: void - get_rr_interval: return infinity (i.e., 0) - select_task_rq: return current cpu
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 166b8c49257c..889730cce3ad 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -74,6 +74,9 @@
74 74
75#include <trace/events/sched.h> 75#include <trace/events/sched.h>
76 76
77#include <litmus/litmus.h>
78#include <litmus/sched_plugin.h>
79
77/* 80/*
78 * Protected counters by write_lock_irq(&tasklist_lock) 81 * Protected counters by write_lock_irq(&tasklist_lock)
79 */ 82 */
@@ -162,6 +165,7 @@ void __put_task_struct(struct task_struct *tsk)
162 WARN_ON(atomic_read(&tsk->usage)); 165 WARN_ON(atomic_read(&tsk->usage));
163 WARN_ON(tsk == current); 166 WARN_ON(tsk == current);
164 167
168 exit_litmus(tsk);
165 exit_creds(tsk); 169 exit_creds(tsk);
166 delayacct_tsk_free(tsk); 170 delayacct_tsk_free(tsk);
167 171
@@ -244,6 +248,9 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
244 248
245 tsk->stack = ti; 249 tsk->stack = ti;
246 250
251 /* Don't let the new task be a real-time task. */
252 memset(&tsk->rt_param, 0, sizeof(struct rt_task));
253
247 err = prop_local_init_single(&tsk->dirties); 254 err = prop_local_init_single(&tsk->dirties);
248 if (err) 255 if (err)
249 goto out; 256 goto out;