aboutsummaryrefslogtreecommitdiffstats
path: root/src/task.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/task.c')
-rw-r--r--src/task.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/task.c b/src/task.c
index 905ab9c..c88c16b 100644
--- a/src/task.c
+++ b/src/task.c
@@ -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, &params); 69 (rt_setup_fn_t) set_rt_task_param, &params);
70} 70}
71 71
72int __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, &params);
87}
88
72int __create_rt_task(rt_fn_t rt_prog, void *arg, int cpu, int wcet, int period, 89int __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{