diff options
author | Glenn Elliott <gelliott@koruna.cs.unc.edu> | 2010-05-20 14:17:58 -0400 |
---|---|---|
committer | Glenn Elliott <gelliott@koruna.cs.unc.edu> | 2010-05-20 14:17:58 -0400 |
commit | e9c900fae35e4e4730469e189ff17bf30518346a (patch) | |
tree | 73d399b98f831fae4a7251a7d3d143ac044d6684 /src/task.c | |
parent | 09740315d4b914203c25c56e8f8909b4fae7b32d (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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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, ¶ms); | 56 | (rt_setup_fn_t) set_rt_task_param, ¶ms); |
54 | } | 57 | } |