aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManohar Vanga <mvanga@mpi-sws.org>2012-10-03 19:06:01 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2012-11-27 13:50:17 -0500
commit63537c738e7eb0ad6bc064b5e47c88092897c1cb (patch)
treee47d645b6567cee533a0e11deac34faf52457868
parente2c4a5f574548f7b2b1d55adab3b02fb2d068ea3 (diff)
litmus: get rid of unused RT_F_EXIT_SEM flag
This patch removes the RT_F_EXIT_SEM flag. All code paths depending on it being true are assumed to be unreachable and removed. The 'flags' field in struct rt_params is left as-is for use by specific schedulers. For example, sched_pfair defines a custom flag RT_F_REQUEUE within the 'flags' field. Signed-off-by: Manohar Vanga <mvanga@mpi-sws.org>
-rw-r--r--include/litmus/litmus.h2
-rw-r--r--include/litmus/rt_param.h3
-rw-r--r--litmus/sched_cedf.c30
-rw-r--r--litmus/sched_gsn_edf.c30
4 files changed, 22 insertions, 43 deletions
diff --git a/include/litmus/litmus.h b/include/litmus/litmus.h
index 12770e08990b..875783e6a67b 100644
--- a/include/litmus/litmus.h
+++ b/include/litmus/litmus.h
@@ -45,8 +45,6 @@ void litmus_exit_task(struct task_struct *tsk);
45#define tsk_rt(t) (&(t)->rt_param) 45#define tsk_rt(t) (&(t)->rt_param)
46 46
47/* Realtime utility macros */ 47/* Realtime utility macros */
48#define get_rt_flags(t) (tsk_rt(t)->flags)
49#define set_rt_flags(t,f) (tsk_rt(t)->flags=(f))
50#define is_priority_boosted(t) (tsk_rt(t)->priority_boosted) 48#define is_priority_boosted(t) (tsk_rt(t)->priority_boosted)
51#define get_boost_start(t) (tsk_rt(t)->boost_start_time) 49#define get_boost_start(t) (tsk_rt(t)->boost_start_time)
52 50
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h
index 5539b26588e6..4cd06dd32906 100644
--- a/include/litmus/rt_param.h
+++ b/include/litmus/rt_param.h
@@ -248,9 +248,6 @@ struct rt_param {
248 struct control_page * ctrl_page; 248 struct control_page * ctrl_page;
249}; 249};
250 250
251/* Possible RT flags */
252#define RT_F_EXIT_SEM 0x00000008
253
254#endif 251#endif
255 252
256#endif 253#endif
diff --git a/litmus/sched_cedf.c b/litmus/sched_cedf.c
index 62d28d2bf1c8..b45b46fc4fca 100644
--- a/litmus/sched_cedf.c
+++ b/litmus/sched_cedf.c
@@ -595,25 +595,17 @@ static void cedf_task_wake_up(struct task_struct *task)
595 cluster = task_cpu_cluster(task); 595 cluster = task_cpu_cluster(task);
596 596
597 raw_spin_lock_irqsave(&cluster->cluster_lock, flags); 597 raw_spin_lock_irqsave(&cluster->cluster_lock, flags);
598 /* We need to take suspensions because of semaphores into 598 now = litmus_clock();
599 * account! If a job resumes after being suspended due to acquiring 599 if (is_tardy(task, now)) {
600 * a semaphore, it should never be treated as a new job release. 600 /* new sporadic release */
601 */ 601 release_at(task, now);
602 if (get_rt_flags(task) == RT_F_EXIT_SEM) { 602 sched_trace_task_release(task);
603 tsk_rt(task)->completed = 0; 603 }
604 } else { 604 else {
605 now = litmus_clock(); 605 if (task->rt.time_slice) {
606 if (is_tardy(task, now)) { 606 /* came back in time before deadline
607 /* new sporadic release */ 607 */
608 release_at(task, now); 608 tsk_rt(task)->completed = 0;
609 sched_trace_task_release(task);
610 }
611 else {
612 if (task->rt.time_slice) {
613 /* came back in time before deadline
614 */
615 tsk_rt(task)->completed = 0;
616 }
617 } 609 }
618 } 610 }
619 cedf_job_arrival(task); 611 cedf_job_arrival(task);
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c
index 990e4e1f86a9..b8548b885b35 100644
--- a/litmus/sched_gsn_edf.c
+++ b/litmus/sched_gsn_edf.c
@@ -577,25 +577,17 @@ static void gsnedf_task_wake_up(struct task_struct *task)
577 TRACE_TASK(task, "wake_up at %llu\n", litmus_clock()); 577 TRACE_TASK(task, "wake_up at %llu\n", litmus_clock());
578 578
579 raw_spin_lock_irqsave(&gsnedf_lock, flags); 579 raw_spin_lock_irqsave(&gsnedf_lock, flags);
580 /* We need to take suspensions because of semaphores into 580 now = litmus_clock();
581 * account! If a job resumes after being suspended due to acquiring 581 if (is_tardy(task, now)) {
582 * a semaphore, it should never be treated as a new job release. 582 /* new sporadic release */
583 */ 583 release_at(task, now);
584 if (get_rt_flags(task) == RT_F_EXIT_SEM) { 584 sched_trace_task_release(task);
585 tsk_rt(task)->completed = 0; 585 }
586 } else { 586 else {
587 now = litmus_clock(); 587 if (task->rt.time_slice) {
588 if (is_tardy(task, now)) { 588 /* came back in time before deadline
589 /* new sporadic release */ 589 */
590 release_at(task, now); 590 tsk_rt(task)->completed = 0;
591 sched_trace_task_release(task);
592 }
593 else {
594 if (task->rt.time_slice) {
595 /* came back in time before deadline
596 */
597 tsk_rt(task)->completed = 0;
598 }
599 } 591 }
600 } 592 }
601 gsnedf_job_arrival(task); 593 gsnedf_job_arrival(task);