diff options
author | Christopher Kenna <cjk@cs.unc.edu> | 2012-10-19 00:28:34 -0400 |
---|---|---|
committer | Christopher Kenna <cjk@cs.unc.edu> | 2012-10-19 00:28:34 -0400 |
commit | 3b286b3c7d25f2abd71ccb7853d1398430a65552 (patch) | |
tree | be2d3c9e1fe902db4f281652ac2d38857a1afb58 | |
parent | 9647ce12fbec5548b9cc0ba82b90c4ed210ee3f3 (diff) | |
parent | 0f1975f5d871d696b11aab9f29fc03824ee2a122 (diff) |
Merge remote-tracking branch 'litmus-rt/wip-mc' into litmus-rt-wip-mc
-rw-r--r-- | litmus/jobs.c | 2 | ||||
-rw-r--r-- | litmus/sched_mc.c | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/litmus/jobs.c b/litmus/jobs.c index f8b5559ce54..097d7dd94d1 100644 --- a/litmus/jobs.c +++ b/litmus/jobs.c | |||
@@ -135,6 +135,8 @@ long complete_job(void) | |||
135 | ++tsk_rt(current)->missed; | 135 | ++tsk_rt(current)->missed; |
136 | } | 136 | } |
137 | 137 | ||
138 | TRACE_TASK(current, "user complete\n"); | ||
139 | |||
138 | /* Mark that we do not execute anymore */ | 140 | /* Mark that we do not execute anymore */ |
139 | tsk_rt(current)->completed = 1; | 141 | tsk_rt(current)->completed = 1; |
140 | tsk_rt(current)->flags = RT_F_SLEEP; | 142 | tsk_rt(current)->flags = RT_F_SLEEP; |
diff --git a/litmus/sched_mc.c b/litmus/sched_mc.c index 0394618dbc9..85be5e17ad0 100644 --- a/litmus/sched_mc.c +++ b/litmus/sched_mc.c | |||
@@ -778,7 +778,8 @@ static void job_completion(struct task_struct *task, int forced) | |||
778 | remove_from_all(task); | 778 | remove_from_all(task); |
779 | } | 779 | } |
780 | 780 | ||
781 | if (lt_before(get_user_release(task), litmus_clock())) { | 781 | if (lt_before(get_user_release(task), litmus_clock()) || |
782 | (release_server && tsk_rt(task)->completed)){ | ||
782 | TRACE_TASK(task, "Executable task going back to running\n"); | 783 | TRACE_TASK(task, "Executable task going back to running\n"); |
783 | tsk_rt(task)->completed = 0; | 784 | tsk_rt(task)->completed = 0; |
784 | } | 785 | } |
@@ -1294,11 +1295,11 @@ static struct task_struct* mc_schedule(struct task_struct* prev) | |||
1294 | 1295 | ||
1295 | BUG_ON(entry->scheduled && entry->scheduled != prev); | 1296 | BUG_ON(entry->scheduled && entry->scheduled != prev); |
1296 | BUG_ON(entry->scheduled && !is_realtime(prev)); | 1297 | BUG_ON(entry->scheduled && !is_realtime(prev)); |
1297 | BUG_ON(is_realtime(prev) && !entry->scheduled); | 1298 | BUG_ON(prev && is_realtime(prev) && !entry->scheduled); |
1298 | 1299 | ||
1299 | if (entry->scheduled != NULL) { | 1300 | if (entry->scheduled != NULL) { |
1300 | prev->rt_param.scheduled_on = NO_CPU; | 1301 | entry->scheduled->rt_param.scheduled_on = NO_CPU; |
1301 | update_server_time(prev); | 1302 | update_server_time(entry->scheduled); |
1302 | } | 1303 | } |
1303 | 1304 | ||
1304 | /* Determine state */ | 1305 | /* Determine state */ |