aboutsummaryrefslogtreecommitdiffstats
path: root/src/task.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@koruna.cs.unc.edu>2010-05-20 14:17:58 -0400
committerGlenn Elliott <gelliott@koruna.cs.unc.edu>2010-05-20 14:17:58 -0400
commite9c900fae35e4e4730469e189ff17bf30518346a (patch)
tree73d399b98f831fae4a7251a7d3d143ac044d6684 /src/task.c
parent09740315d4b914203c25c56e8f8909b4fae7b32d (diff)
Support budget enforcement policies. Allows tasks to specify
how their execution budgets should be enforced: NO_ENFORCEMENT, QUANTUM_ENFORCEMENT, and PRECISE_ENFORCEMENT (unsupported). NOTE: Users of NO_ENFORCEMENT must call sleep_next_period() at the end of every job to signal to the kernel that its job is complete.
Diffstat (limited to 'src/task.c')
-rw-r--r--src/task.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/task.c b/src/task.c
index f9e4ccf..4d237bd 100644
--- a/src/task.c
+++ b/src/task.c
@@ -49,6 +49,9 @@ int __create_rt_task(rt_fn_t rt_prog, void *arg, int cpu, int wcet, int period,
49 params.exec_cost = wcet; 49 params.exec_cost = wcet;
50 params.cls = class; 50 params.cls = class;
51 params.phase = 0; 51 params.phase = 0;
52 /* enforce budget for tasks that might not use sleep_next_period() */
53 params.budget_policy = QUANTUM_ENFORCEMENT;
54
52 return __launch_rt_task(rt_prog, arg, 55 return __launch_rt_task(rt_prog, arg,
53 (rt_setup_fn_t) set_rt_task_param, &params); 56 (rt_setup_fn_t) set_rt_task_param, &params);
54} 57}