diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/task.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -40,8 +40,8 @@ int __launch_rt_task(rt_fn_t rt_prog, void *rt_arg, rt_setup_fn_t setup, | |||
40 | return rt_task; | 40 | return rt_task; |
41 | } | 41 | } |
42 | 42 | ||
43 | int __create_rt_task(rt_fn_t rt_prog, void *arg, int cpu, int wcet, int period, | 43 | int __create_rt_task(rt_fn_t rt_prog, void *arg, int cpu, lt_t wcet, lt_t period, |
44 | task_class_t class) | 44 | unsigned int priority, task_class_t class) |
45 | { | 45 | { |
46 | struct rt_task params; | 46 | struct rt_task params; |
47 | params.cpu = cpu; | 47 | params.cpu = cpu; |
@@ -49,6 +49,7 @@ 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 | params.priority = priority; | ||
52 | /* enforce budget for tasks that might not use sleep_next_period() */ | 53 | /* enforce budget for tasks that might not use sleep_next_period() */ |
53 | params.budget_policy = QUANTUM_ENFORCEMENT; | 54 | params.budget_policy = QUANTUM_ENFORCEMENT; |
54 | 55 | ||
@@ -56,8 +57,9 @@ int __create_rt_task(rt_fn_t rt_prog, void *arg, int cpu, int wcet, int period, | |||
56 | (rt_setup_fn_t) set_rt_task_param, ¶ms); | 57 | (rt_setup_fn_t) set_rt_task_param, ¶ms); |
57 | } | 58 | } |
58 | 59 | ||
59 | int create_rt_task(rt_fn_t rt_prog, void *arg, int cpu, int wcet, int period) { | 60 | int create_rt_task(rt_fn_t rt_prog, void *arg, int cpu, lt_t wcet, lt_t period, |
60 | return __create_rt_task(rt_prog, arg, cpu, wcet, period, RT_CLASS_HARD); | 61 | unsigned int priority) { |
62 | return __create_rt_task(rt_prog, arg, cpu, wcet, period, priority, RT_CLASS_HARD); | ||
61 | } | 63 | } |
62 | 64 | ||
63 | 65 | ||