aboutsummaryrefslogtreecommitdiffstats
path: root/rt-plot-task.c
diff options
context:
space:
mode:
Diffstat (limited to 'rt-plot-task.c')
-rw-r--r--rt-plot-task.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/rt-plot-task.c b/rt-plot-task.c
index 6e0013d..afb2bef 100644
--- a/rt-plot-task.c
+++ b/rt-plot-task.c
@@ -677,8 +677,20 @@ void rt_plot_task(struct graph_info *ginfo, int pid, int pos)
677void rt_plot_add_all_tasks(struct graph_info *ginfo) 677void rt_plot_add_all_tasks(struct graph_info *ginfo)
678 { 678 {
679 gint *tasks; 679 gint *tasks;
680 int i; 680 int i, j, len, tmp;
681 tasks = task_list_pids(ginfo->rtg_info.tasks); 681 tasks = task_list_pids(ginfo->rtg_info.tasks);
682 for (i = 0; tasks[i] != -1; i++) 682
683 for (i = 0; tasks[i] != -1; ++i) {
684 for (j = i; tasks[j] != -1; ++j) {
685 if (tasks[i] > tasks[j]) {
686 tmp = tasks[i];
687 tasks[i] = tasks[j];
688 tasks[j] = tmp;
689 }
690 }
691 }
692
693 for (i = 0; tasks[i] != -1; ++i) {
683 rt_plot_task(ginfo, tasks[i], ginfo->plots); 694 rt_plot_task(ginfo, tasks[i], ginfo->plots);
695 }
684} 696}