aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/aux_tasks.c
diff options
context:
space:
mode:
Diffstat (limited to 'litmus/aux_tasks.c')
-rw-r--r--litmus/aux_tasks.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/litmus/aux_tasks.c b/litmus/aux_tasks.c
index efda7dc0bd76..9572d960b46a 100644
--- a/litmus/aux_tasks.c
+++ b/litmus/aux_tasks.c
@@ -50,6 +50,7 @@ int exit_aux_task(struct task_struct *t)
50 50
51 TRACE_CUR("Aux task %s/%d is exiting from %s/%d.\n", t->comm, t->pid, leader->comm, leader->pid); 51 TRACE_CUR("Aux task %s/%d is exiting from %s/%d.\n", t->comm, t->pid, leader->comm, leader->pid);
52 52
53#if 0
53 list_del(&tsk_rt(t)->aux_task_node); 54 list_del(&tsk_rt(t)->aux_task_node);
54 55
55 tsk_rt(t)->is_aux_task = 0; 56 tsk_rt(t)->is_aux_task = 0;
@@ -57,6 +58,7 @@ int exit_aux_task(struct task_struct *t)
57 if (tsk_rt(t)->inh_task) { 58 if (tsk_rt(t)->inh_task) {
58 litmus->__decrease_prio(t, NULL); 59 litmus->__decrease_prio(t, NULL);
59 } 60 }
61#endif
60 62
61 return retval; 63 return retval;
62} 64}
@@ -64,6 +66,8 @@ int exit_aux_task(struct task_struct *t)
64static int aux_tasks_increase_priority(struct task_struct *leader, struct task_struct *hp) 66static int aux_tasks_increase_priority(struct task_struct *leader, struct task_struct *hp)
65{ 67{
66 int retval = 0; 68 int retval = 0;
69
70#if 0
67 struct list_head *pos; 71 struct list_head *pos;
68 72
69 TRACE_CUR("Increasing priority of aux tasks in group %s/%d.\n", leader->comm, leader->pid); 73 TRACE_CUR("Increasing priority of aux tasks in group %s/%d.\n", leader->comm, leader->pid);
@@ -81,6 +85,7 @@ static int aux_tasks_increase_priority(struct task_struct *leader, struct task_s
81 TRACE_CUR("increasing %s/%d.\n", aux->comm, aux->pid); 85 TRACE_CUR("increasing %s/%d.\n", aux->comm, aux->pid);
82 retval = litmus->__increase_prio(aux, hp); 86 retval = litmus->__increase_prio(aux, hp);
83 } 87 }
88#endif
84 89
85 return retval; 90 return retval;
86} 91}
@@ -88,6 +93,8 @@ static int aux_tasks_increase_priority(struct task_struct *leader, struct task_s
88static int aux_tasks_decrease_priority(struct task_struct *leader, struct task_struct *hp) 93static int aux_tasks_decrease_priority(struct task_struct *leader, struct task_struct *hp)
89{ 94{
90 int retval = 0; 95 int retval = 0;
96
97#if 0
91 struct list_head *pos; 98 struct list_head *pos;
92 99
93 TRACE_CUR("Decreasing priority of aux tasks in group %s/%d.\n", leader->comm, leader->pid); 100 TRACE_CUR("Decreasing priority of aux tasks in group %s/%d.\n", leader->comm, leader->pid);
@@ -105,6 +112,7 @@ static int aux_tasks_decrease_priority(struct task_struct *leader, struct task_s
105 retval = litmus->__decrease_prio(aux, hp); 112 retval = litmus->__decrease_prio(aux, hp);
106 } 113 }
107 } 114 }
115#endif
108 116
109 return retval; 117 return retval;
110} 118}
@@ -112,6 +120,8 @@ static int aux_tasks_decrease_priority(struct task_struct *leader, struct task_s
112int aux_task_owner_increase_priority(struct task_struct *t) 120int aux_task_owner_increase_priority(struct task_struct *t)
113{ 121{
114 int retval = 0; 122 int retval = 0;
123
124#if 0
115 struct task_struct *leader; 125 struct task_struct *leader;
116 struct task_struct *hp = NULL; 126 struct task_struct *hp = NULL;
117 struct task_struct *hp_eff = NULL; 127 struct task_struct *hp_eff = NULL;
@@ -146,6 +156,7 @@ int aux_task_owner_increase_priority(struct task_struct *t)
146 TRACE_CUR("%s/%d is new hp in group %s/%d.\n", t->comm, t->pid, leader->comm, leader->pid); 156 TRACE_CUR("%s/%d is new hp in group %s/%d.\n", t->comm, t->pid, leader->comm, leader->pid);
147 retval = aux_tasks_increase_priority(leader, hp_eff); 157 retval = aux_tasks_increase_priority(leader, hp_eff);
148 } 158 }
159#endif
149 160
150out: 161out:
151 return retval; 162 return retval;
@@ -154,6 +165,8 @@ out:
154int aux_task_owner_decrease_priority(struct task_struct *t) 165int aux_task_owner_decrease_priority(struct task_struct *t)
155{ 166{
156 int retval = 0; 167 int retval = 0;
168
169#if 0
157 struct task_struct *leader; 170 struct task_struct *leader;
158 struct task_struct *hp = NULL; 171 struct task_struct *hp = NULL;
159 struct task_struct *hp_eff = NULL; 172 struct task_struct *hp_eff = NULL;
@@ -189,6 +202,7 @@ int aux_task_owner_decrease_priority(struct task_struct *t)
189 retval = aux_tasks_decrease_priority(leader, hp_eff); 202 retval = aux_tasks_decrease_priority(leader, hp_eff);
190 } 203 }
191 } 204 }
205#endif
192 206
193out: 207out:
194 return retval; 208 return retval;
@@ -199,6 +213,8 @@ out:
199long enable_aux_task_owner(struct task_struct *t) 213long enable_aux_task_owner(struct task_struct *t)
200{ 214{
201 long retval = 0; 215 long retval = 0;
216
217#if 0
202 struct task_struct *leader = t->group_leader; 218 struct task_struct *leader = t->group_leader;
203 struct task_struct *hp; 219 struct task_struct *hp;
204 220
@@ -226,7 +242,7 @@ long enable_aux_task_owner(struct task_struct *t)
226 retval = aux_tasks_increase_priority(leader, 242 retval = aux_tasks_increase_priority(leader,
227 (tsk_rt(hp)->inh_task)? tsk_rt(hp)->inh_task : hp); 243 (tsk_rt(hp)->inh_task)? tsk_rt(hp)->inh_task : hp);
228 } 244 }
229 245#endif
230 246
231out: 247out:
232 return retval; 248 return retval;
@@ -235,6 +251,8 @@ out:
235long disable_aux_task_owner(struct task_struct *t) 251long disable_aux_task_owner(struct task_struct *t)
236{ 252{
237 long retval = 0; 253 long retval = 0;
254
255#if 0
238 struct task_struct *leader = t->group_leader; 256 struct task_struct *leader = t->group_leader;
239 struct task_struct *hp; 257 struct task_struct *hp;
240 struct task_struct *new_hp = NULL; 258 struct task_struct *new_hp = NULL;
@@ -273,6 +291,7 @@ long disable_aux_task_owner(struct task_struct *t)
273 291
274 retval = aux_tasks_decrease_priority(leader, to_inh); 292 retval = aux_tasks_decrease_priority(leader, to_inh);
275 } 293 }
294#endif
276 295
277out: 296out:
278 return retval; 297 return retval;
@@ -324,7 +343,10 @@ static long __do_enable_aux_tasks(void)
324 TRACE_CUR("AUX task in %s/%d: %s/%d:\n", leader->comm, leader->pid, t->comm, t->pid); 343 TRACE_CUR("AUX task in %s/%d: %s/%d:\n", leader->comm, leader->pid, t->comm, t->pid);
325 /* hasn't been aux_tasks_increase_priorityted into rt. make it a aux. */ 344 /* hasn't been aux_tasks_increase_priorityted into rt. make it a aux. */
326 tsk_rt(t)->is_aux_task = 1; 345 tsk_rt(t)->is_aux_task = 1;
346
347#if 0
327 list_add_tail(&tsk_rt(t)->aux_task_node, &tsk_aux(leader)->aux_tasks); 348 list_add_tail(&tsk_rt(t)->aux_task_node, &tsk_aux(leader)->aux_tasks);
349#endif
328 350
329 (void)admit_aux_task(t); 351 (void)admit_aux_task(t);
330 } 352 }
@@ -346,6 +368,7 @@ static long __do_enable_aux_tasks(void)
346 } while(t != leader); 368 } while(t != leader);
347 369
348 370
371#if 0
349 if (!binheap_empty(&tsk_aux(leader)->aux_task_owners)) { 372 if (!binheap_empty(&tsk_aux(leader)->aux_task_owners)) {
350 struct task_struct *hp = container_of(binheap_top_entry(&tsk_aux(leader)->aux_task_owners, struct rt_param, aux_task_owner_node), 373 struct task_struct *hp = container_of(binheap_top_entry(&tsk_aux(leader)->aux_task_owners, struct rt_param, aux_task_owner_node),
351 struct task_struct, rt_param); 374 struct task_struct, rt_param);
@@ -353,6 +376,7 @@ static long __do_enable_aux_tasks(void)
353 retval = aux_tasks_increase_priority(leader, 376 retval = aux_tasks_increase_priority(leader,
354 (tsk_rt(hp)->inh_task)? tsk_rt(hp)->inh_task : hp); 377 (tsk_rt(hp)->inh_task)? tsk_rt(hp)->inh_task : hp);
355 } 378 }
379#endif
356 380
357 return retval; 381 return retval;
358} 382}