diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-04-29 11:46:42 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-04-29 11:46:42 -0400 |
commit | f60873de7c15d578974566bd052280666c759864 (patch) | |
tree | 48f0b4ed121a4a23715bfdf2c5032c654e9103e7 /src | |
parent | 715800e7610887ce87b5b6af61f9bddfdc29d97d (diff) |
add sporadic_task_ns() helper
Allows for higher-precision setup of real-time tasks.
Diffstat (limited to 'src')
-rw-r--r-- | src/litmus.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/litmus.c b/src/litmus.c index 8f03f4c..5f98b97 100644 --- a/src/litmus.c +++ b/src/litmus.c | |||
@@ -44,10 +44,17 @@ int be_migrate_to(int target_cpu) | |||
44 | int sporadic_task(lt_t e, lt_t p, lt_t phase, | 44 | int sporadic_task(lt_t e, lt_t p, lt_t phase, |
45 | int cpu, task_class_t cls, int set_cpu_set) | 45 | int cpu, task_class_t cls, int set_cpu_set) |
46 | { | 46 | { |
47 | return sporadic_task_ns(e * NS_PER_MS, p * NS_PER_MS, phase * NS_PER_MS, | ||
48 | cpu, cls, set_cpu_set); | ||
49 | } | ||
50 | |||
51 | int sporadic_task_ns(lt_t e, lt_t p, lt_t phase, | ||
52 | int cpu, task_class_t cls, int set_cpu_set) | ||
53 | { | ||
47 | struct rt_task param; | 54 | struct rt_task param; |
48 | int ret; | 55 | int ret; |
49 | param.exec_cost = e * NS_PER_MS; | 56 | param.exec_cost = e; |
50 | param.period = p * NS_PER_MS; | 57 | param.period = p; |
51 | param.cpu = cpu; | 58 | param.cpu = cpu; |
52 | param.cls = cls; | 59 | param.cls = cls; |
53 | param.phase = phase; | 60 | param.phase = phase; |