diff options
Diffstat (limited to 'litmus/litmus.c')
-rw-r--r-- | litmus/litmus.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/litmus/litmus.c b/litmus/litmus.c index 8efd3f9ef7ee..11ccaafd50de 100644 --- a/litmus/litmus.c +++ b/litmus/litmus.c | |||
@@ -292,9 +292,6 @@ static void reinit_litmus_state(struct task_struct* p, int restore) | |||
292 | */ | 292 | */ |
293 | WARN_ON(p->rt_param.inh_task); | 293 | WARN_ON(p->rt_param.inh_task); |
294 | 294 | ||
295 | /* We need to restore the priority of the task. */ | ||
296 | // __setscheduler(p, p->rt_param.old_policy, p->rt_param.old_prio); XXX why is this commented? | ||
297 | |||
298 | /* Cleanup everything else. */ | 295 | /* Cleanup everything else. */ |
299 | memset(&p->rt_param, 0, sizeof(p->rt_param)); | 296 | memset(&p->rt_param, 0, sizeof(p->rt_param)); |
300 | 297 | ||
@@ -437,10 +434,12 @@ out: | |||
437 | */ | 434 | */ |
438 | void litmus_fork(struct task_struct* p) | 435 | void litmus_fork(struct task_struct* p) |
439 | { | 436 | { |
440 | if (is_realtime(p)) | 437 | if (is_realtime(p)) { |
441 | /* clean out any litmus related state, don't preserve anything */ | 438 | /* clean out any litmus related state, don't preserve anything */ |
442 | reinit_litmus_state(p, 0); | 439 | reinit_litmus_state(p, 0); |
443 | else | 440 | /* Don't let the child be a real-time task. */ |
441 | p->sched_reset_on_fork = 1; | ||
442 | } else | ||
444 | /* non-rt tasks might have ctrl_page set */ | 443 | /* non-rt tasks might have ctrl_page set */ |
445 | tsk_rt(p)->ctrl_page = NULL; | 444 | tsk_rt(p)->ctrl_page = NULL; |
446 | 445 | ||