diff options
| author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-06-26 04:47:54 -0400 |
|---|---|---|
| committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-06-26 04:47:54 -0400 |
| commit | e4b2da0cecd9a43be71430b1f8e2fbbde07ea6ec (patch) | |
| tree | e2432b2f905ea89e8529a6c90a17c79965923b67 /include | |
| parent | 6e1ceb5ab56005fd343f52bbb8d2879e2c1493bd (diff) | |
Make use of kernel-provided FP macros
Use the kernel's notion of fixed priorities.
Also, add some clarifying comments to the
task setup wrappers.
Diffstat (limited to 'include')
| -rw-r--r-- | include/litmus.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/include/litmus.h b/include/litmus.h index 232dcf5..3fa2a57 100644 --- a/include/litmus.h +++ b/include/litmus.h | |||
| @@ -29,26 +29,34 @@ int get_rt_task_param(pid_t pid, struct rt_task* param); | |||
| 29 | 29 | ||
| 30 | /* setup helper */ | 30 | /* setup helper */ |
| 31 | 31 | ||
| 32 | /* times are given in ms */ | 32 | /* Times are given in ms. The 'priority' parameter |
| 33 | * is only relevant under fixed-priority scheduling (and | ||
| 34 | * ignored by other plugins). The task_class_t parameter | ||
| 35 | * is ignored by most plugins. | ||
| 36 | */ | ||
| 33 | int sporadic_task( | 37 | int sporadic_task( |
| 34 | lt_t e, lt_t p, lt_t phase, | 38 | lt_t e, lt_t p, lt_t phase, |
| 35 | int partition, unsigned int priority, | 39 | int partition, unsigned int priority, |
| 36 | task_class_t cls, | 40 | task_class_t cls, |
| 37 | budget_policy_t budget_policy, int set_cpu_set); | 41 | budget_policy_t budget_policy, int set_cpu_set); |
| 38 | 42 | ||
| 39 | /* times are given in ns */ | 43 | /* Times are given in ns. The 'priority' parameter |
| 44 | * is only relevant under fixed-priority scheduling (and | ||
| 45 | * ignored by other plugins). The task_class_t parameter | ||
| 46 | * is ignored by most plugins. | ||
| 47 | */ | ||
| 40 | int sporadic_task_ns( | 48 | int sporadic_task_ns( |
| 41 | lt_t e, lt_t p, lt_t phase, | 49 | lt_t e, lt_t p, lt_t phase, |
| 42 | int cpu, unsigned int priority, | 50 | int cpu, unsigned int priority, |
| 43 | task_class_t cls, | 51 | task_class_t cls, |
| 44 | budget_policy_t budget_policy, int set_cpu_set); | 52 | budget_policy_t budget_policy, int set_cpu_set); |
| 45 | 53 | ||
| 46 | /* budget enforcement off by default in these macros */ | 54 | /* Convenience macros. Budget enforcement off by default in these macros. */ |
| 47 | #define sporadic_global(e, p) \ | 55 | #define sporadic_global(e, p) \ |
| 48 | sporadic_task(e, p, 0, 0, LITMUS_MAX_PRIORITY-1, \ | 56 | sporadic_task(e, p, 0, 0, LITMUS_LOWEST_PRIORITY, \ |
| 49 | RT_CLASS_SOFT, NO_ENFORCEMENT, 0) | 57 | RT_CLASS_SOFT, NO_ENFORCEMENT, 0) |
| 50 | #define sporadic_partitioned(e, p, cpu) \ | 58 | #define sporadic_partitioned(e, p, cpu) \ |
| 51 | sporadic_task(e, p, 0, cpu, LITMUS_MAX_PRIORITY-1, \ | 59 | sporadic_task(e, p, 0, cpu, LITMUS_LOWEST_PRIORITY, \ |
| 52 | RT_CLASS_SOFT, NO_ENFORCEMENT, 1) | 60 | RT_CLASS_SOFT, NO_ENFORCEMENT, 1) |
| 53 | 61 | ||
| 54 | /* file descriptor attached shared objects support */ | 62 | /* file descriptor attached shared objects support */ |
