aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/rt_param.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/litmus/rt_param.h')
-rw-r--r--include/litmus/rt_param.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h
index 2ced0dba067d..a8c82eed5562 100644
--- a/include/litmus/rt_param.h
+++ b/include/litmus/rt_param.h
@@ -33,11 +33,33 @@ typedef enum {
33 PRECISE_ENFORCEMENT /* budgets are enforced with hrtimers */ 33 PRECISE_ENFORCEMENT /* budgets are enforced with hrtimers */
34} budget_policy_t; 34} budget_policy_t;
35 35
36/* We use the common priority interpretation "lower index == higher priority",
37 * which is commonly used in fixed-priority schedulability analysis papers.
38 * So, a numerically lower priority value implies higher scheduling priority,
39 * with priority 1 being the highest priority. Priority 0 is reserved for
40 * priority boosting. LITMUS_MAX_PRIORITY denotes the maximum priority value
41 * range.
42 */
43
44#define LITMUS_MAX_PRIORITY 512
45#define LITMUS_HIGHEST_PRIORITY 1
46#define LITMUS_LOWEST_PRIORITY (LITMUS_MAX_PRIORITY - 1)
47
48/* Provide generic comparison macros for userspace,
49 * in case that we change this later. */
50#define litmus_higher_fixed_prio(a, b) (a < b)
51#define litmus_lower_fixed_prio(a, b) (a > b)
52#define litmus_is_valid_fixed_prio(p) \
53 ((p) >= LITMUS_HIGHEST_PRIORITY && \
54 (p) <= LITMUS_LOWEST_PRIORITY)
55
36struct rt_task { 56struct rt_task {
37 lt_t exec_cost; 57 lt_t exec_cost;
38 lt_t period; 58 lt_t period;
59 lt_t relative_deadline;
39 lt_t phase; 60 lt_t phase;
40 unsigned int cpu; 61 unsigned int cpu;
62 unsigned int priority;
41 task_class_t cls; 63 task_class_t cls;
42 budget_policy_t budget_policy; /* ignored by pfair */ 64 budget_policy_t budget_policy; /* ignored by pfair */
43}; 65};
@@ -119,6 +141,12 @@ struct rt_job {
119 /* How much service has this job received so far? */ 141 /* How much service has this job received so far? */
120 lt_t exec_time; 142 lt_t exec_time;
121 143
144 /* By how much did the prior job miss its deadline by?
145 * Value differs from tardiness in that lateness may
146 * be negative (when job finishes before its deadline).
147 */
148 long long lateness;
149
122 /* Which job is this. This is used to let user space 150 /* Which job is this. This is used to let user space
123 * specify which job to wait for, which is important if jobs 151 * specify which job to wait for, which is important if jobs
124 * overrun. If we just call sys_sleep_next_period() then we 152 * overrun. If we just call sys_sleep_next_period() then we