diff options
Diffstat (limited to 'include/litmus/rt_param.h')
-rw-r--r-- | include/litmus/rt_param.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 1ce96af51287..c4669a276e6f 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
@@ -33,7 +33,25 @@ 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 | #define LITMUS_MAX_PRIORITY 512 | 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) | ||
37 | 55 | ||
38 | struct rt_task { | 56 | struct rt_task { |
39 | lt_t exec_cost; | 57 | lt_t exec_cost; |