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.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/litmus/aux_tasks.c b/litmus/aux_tasks.c
index 5057137bbbea..b0617accdf7f 100644
--- a/litmus/aux_tasks.c
+++ b/litmus/aux_tasks.c
@@ -1,8 +1,8 @@
1#ifdef CONFIG_LITMUS_LOCKING
2
3#include <litmus/sched_plugin.h> 1#include <litmus/sched_plugin.h>
4#include <litmus/trace.h> 2#include <litmus/trace.h>
5#include <litmus/litmus.h> 3#include <litmus/litmus.h>
4
5#ifdef CONFIG_REALTIME_AUX_TASKS
6#include <litmus/rt_param.h> 6#include <litmus/rt_param.h>
7#include <litmus/aux_tasks.h> 7#include <litmus/aux_tasks.h>
8 8
@@ -23,14 +23,11 @@ static int admit_aux_task(struct task_struct *t)
23 * fail-safe. 23 * fail-safe.
24 */ 24 */
25 struct rt_task tp = { 25 struct rt_task tp = {
26 //.period = MAGIC_AUX_TASK_PERIOD, 26 .period = 1000000, /* 1ms */
27 //.relative_deadline = MAGIC_AUX_TASK_PERIOD,
28 .period = 1000000, /* has to wait 1 ms before it can run again once it has exhausted budget */
29 .relative_deadline = 1000000, 27 .relative_deadline = 1000000,
30 .exec_cost = 1000000, /* allow full utilization */ 28 .exec_cost = 1000000, /* allow full utilization */
31 .phase = 0, 29 .phase = 0,
32 .cpu = task_cpu(leader), /* take CPU of group leader */ 30 .cpu = task_cpu(leader), /* take CPU of group leader */
33 //.budget_policy = NO_ENFORCEMENT,
34 .budget_policy = QUANTUM_ENFORCEMENT, 31 .budget_policy = QUANTUM_ENFORCEMENT,
35 .budget_signal_policy = NO_SIGNALS, 32 .budget_signal_policy = NO_SIGNALS,
36 .cls = RT_CLASS_BEST_EFFORT 33 .cls = RT_CLASS_BEST_EFFORT
@@ -280,7 +277,7 @@ static int aux_task_owner_max_priority_order(struct binheap_node *a,
280} 277}
281 278
282 279
283static long __do_enable_slave_non_rt_threads(void) 280static long __do_enable_aux_tasks(void)
284{ 281{
285 long retval = 0; 282 long retval = 0;
286 struct task_struct *leader; 283 struct task_struct *leader;
@@ -344,7 +341,7 @@ static long __do_enable_slave_non_rt_threads(void)
344 return retval; 341 return retval;
345} 342}
346 343
347static long __do_disable_slave_non_rt_threads(void) 344static long __do_disable_aux_tasks(void)
348{ 345{
349 long retval = 0; 346 long retval = 0;
350 struct task_struct *leader; 347 struct task_struct *leader;
@@ -385,17 +382,17 @@ static long __do_disable_slave_non_rt_threads(void)
385 return retval; 382 return retval;
386} 383}
387 384
388asmlinkage long sys_slave_non_rt_threads(int enable) 385asmlinkage long sys_set_aux_tasks(int enable)
389{ 386{
390 long retval; 387 long retval;
391 388
392 read_lock_irq(&tasklist_lock); 389 read_lock_irq(&tasklist_lock);
393 390
394 if (enable) { 391 if (enable) {
395 retval = __do_enable_slave_non_rt_threads(); 392 retval = __do_enable_aux_tasks();
396 } 393 }
397 else { 394 else {
398 retval = __do_disable_slave_non_rt_threads(); 395 retval = __do_disable_aux_tasks();
399 } 396 }
400 397
401 read_unlock_irq(&tasklist_lock); 398 read_unlock_irq(&tasklist_lock);
@@ -405,9 +402,9 @@ asmlinkage long sys_slave_non_rt_threads(int enable)
405 402
406#else 403#else
407 404
408asmlinkage long sys_slave_non_rt_tasks(int enable) 405asmlinkage long sys_set_aux_tasks(int enable)
409{ 406{
410 printk("Unsupported. Recompile with CONFIG_LITMUS_LOCKING.\n"); 407 printk("Unsupported. Recompile with CONFIG_REALTIME_AUX_TASKS.\n");
411 return -EINVAL; 408 return -EINVAL;
412} 409}
413 410