diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/litmus/litmus.h | 2 | ||||
-rw-r--r-- | include/litmus/rt_param.h | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/include/litmus/litmus.h b/include/litmus/litmus.h index 62107e659c12..d515d1af1096 100644 --- a/include/litmus/litmus.h +++ b/include/litmus/litmus.h | |||
@@ -83,6 +83,8 @@ inline static int budget_exhausted(struct task_struct* t) | |||
83 | return get_exec_time(t) >= get_exec_cost(t); | 83 | return get_exec_time(t) >= get_exec_cost(t); |
84 | } | 84 | } |
85 | 85 | ||
86 | #define budget_enforced(t) (tsk_rt(t)->task_params.budget_policy != NO_ENFORCEMENT) | ||
87 | |||
86 | 88 | ||
87 | #define is_hrt(t) \ | 89 | #define is_hrt(t) \ |
88 | (tsk_rt(t)->task_params.class == RT_CLASS_HARD) | 90 | (tsk_rt(t)->task_params.class == RT_CLASS_HARD) |
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 5b94d1a8eea7..a7a183f34a80 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
@@ -27,12 +27,19 @@ typedef enum { | |||
27 | RT_CLASS_BEST_EFFORT | 27 | RT_CLASS_BEST_EFFORT |
28 | } task_class_t; | 28 | } task_class_t; |
29 | 29 | ||
30 | typedef enum { | ||
31 | NO_ENFORCEMENT, /* job may overrun unhindered */ | ||
32 | QUANTUM_ENFORCEMENT, /* budgets are only checked on quantum boundaries */ | ||
33 | PRECISE_ENFORCEMENT /* NOT IMPLEMENTED - enforced with hrtimers */ | ||
34 | } budget_policy_t; | ||
35 | |||
30 | struct rt_task { | 36 | struct rt_task { |
31 | lt_t exec_cost; | 37 | lt_t exec_cost; |
32 | lt_t period; | 38 | lt_t period; |
33 | lt_t phase; | 39 | lt_t phase; |
34 | unsigned int cpu; | 40 | unsigned int cpu; |
35 | task_class_t cls; | 41 | task_class_t cls; |
42 | budget_policy_t budget_policy; /* ignored by pfair */ | ||
36 | }; | 43 | }; |
37 | 44 | ||
38 | /* The definition of the data that is shared between the kernel and real-time | 45 | /* The definition of the data that is shared between the kernel and real-time |