diff options
Diffstat (limited to 'src/task.c')
-rw-r--r-- | src/task.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -69,6 +69,23 @@ int __create_rt_task_edffm(rt_fn_t rt_prog, void *arg, int cpu, int wcet, | |||
69 | (rt_setup_fn_t) set_rt_task_param, ¶ms); | 69 | (rt_setup_fn_t) set_rt_task_param, ¶ms); |
70 | } | 70 | } |
71 | 71 | ||
72 | int __create_rt_task_npsf(rt_fn_t rt_prog, void *arg, int cpu, int wcet, | ||
73 | int period, task_class_t class, int npsf_id) | ||
74 | { | ||
75 | struct rt_task params; | ||
76 | params.cpu = cpu; | ||
77 | params.period = period; | ||
78 | params.exec_cost = wcet; | ||
79 | params.cls = class; | ||
80 | params.phase = 0; | ||
81 | /* enforce budget for tasks that might not use sleep_next_period() */ | ||
82 | params.budget_policy = QUANTUM_ENFORCEMENT; | ||
83 | params.npsf_id = npsf_id; | ||
84 | |||
85 | return __launch_rt_task(rt_prog, arg, | ||
86 | (rt_setup_fn_t) set_rt_task_param, ¶ms); | ||
87 | } | ||
88 | |||
72 | int __create_rt_task(rt_fn_t rt_prog, void *arg, int cpu, int wcet, int period, | 89 | int __create_rt_task(rt_fn_t rt_prog, void *arg, int cpu, int wcet, int period, |
73 | task_class_t class) | 90 | task_class_t class) |
74 | { | 91 | { |