aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2008-01-22 16:35:32 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2008-01-22 16:35:32 -0500
commitd5cf0d54a5f039908713def222484ea50dd2c5cd (patch)
tree3fca98aecb92a685041780c8dba050ac03ce0134
parent42406fdae0d3d14fa144695205a318cdf9dd3806 (diff)
[GSN-EDF] add additional sanity check
-rw-r--r--kernel/sched_gsn_edf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/sched_gsn_edf.c b/kernel/sched_gsn_edf.c
index bd7da5ef56..f6ba5215c2 100644
--- a/kernel/sched_gsn_edf.c
+++ b/kernel/sched_gsn_edf.c
@@ -341,8 +341,9 @@ static reschedule_check_t gsnedf_scheduler_tick(void)
341 * this makes sure that at the end of real-time mode 341 * this makes sure that at the end of real-time mode
342 * no task "runs away forever". 342 * no task "runs away forever".
343 */ 343 */
344 if (is_realtime(t)) 344 if (is_realtime(t)) {
345 TRACE_CUR("before dec: time_slice == %u\n", t->time_slice); 345 TRACE_CUR("before dec: time_slice == %u\n", t->time_slice);
346 }
346 347
347 if (is_realtime(t) && t->time_slice && !--t->time_slice) { 348 if (is_realtime(t) && t->time_slice && !--t->time_slice) {
348 if (!is_np(t)) { /* np tasks will be preempted when they become 349 if (!is_np(t)) { /* np tasks will be preempted when they become
@@ -436,6 +437,7 @@ static int gsnedf_schedule(struct task_struct * prev,
436 /* sanity checking */ 437 /* sanity checking */
437 BUG_ON(entry->scheduled && entry->scheduled != prev); 438 BUG_ON(entry->scheduled && entry->scheduled != prev);
438 BUG_ON(entry->scheduled && !is_realtime(prev)); 439 BUG_ON(entry->scheduled && !is_realtime(prev));
440 BUG_ON(is_realtime(prev) && !entry->scheduled);
439 441
440 /* (0) Determine state */ 442 /* (0) Determine state */
441 exists = entry->scheduled != NULL; 443 exists = entry->scheduled != NULL;