diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-09-07 23:25:01 -0400 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-09-07 23:33:05 -0400 |
commit | 6a225701acf7d79f292eeffcd99d6f00b02c180b (patch) | |
tree | 6a7f538703a5a6460a0e53c62f0f952998840ea1 /include/litmus/rt_param.h | |
parent | b53c479a0f44b8990ce106622412a3bf54809944 (diff) |
Infrastructure for Litmus signals.prop/litmus-signals
Added signals to Litmus. Specifcally, SIG_BUDGET signals
are delivered (when requested by real-time tasks) when
a budget is exceeded.
Note: pfair not currently supported (but it probably could be).
Diffstat (limited to 'include/litmus/rt_param.h')
-rw-r--r-- | include/litmus/rt_param.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 89ac0dda7d3d..637fe6b84f9d 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
@@ -30,9 +30,15 @@ typedef enum { | |||
30 | typedef enum { | 30 | typedef enum { |
31 | NO_ENFORCEMENT, /* job may overrun unhindered */ | 31 | NO_ENFORCEMENT, /* job may overrun unhindered */ |
32 | QUANTUM_ENFORCEMENT, /* budgets are only checked on quantum boundaries */ | 32 | QUANTUM_ENFORCEMENT, /* budgets are only checked on quantum boundaries */ |
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 | typedef enum { | ||
37 | NO_SIGNALS, /* job receives no signals when it exhausts its budget */ | ||
38 | QUANTUM_SIGNALS, /* budget signals are only sent on quantum boundaries */ | ||
39 | PRECISE_SIGNALS, /* budget signals are triggered with hrtimers */ | ||
40 | } budget_signal_policy_t; | ||
41 | |||
36 | /* We use the common priority interpretation "lower index == higher priority", | 42 | /* We use the common priority interpretation "lower index == higher priority", |
37 | * which is commonly used in fixed-priority schedulability analysis papers. | 43 | * which is commonly used in fixed-priority schedulability analysis papers. |
38 | * So, a numerically lower priority value implies higher scheduling priority, | 44 | * So, a numerically lower priority value implies higher scheduling priority, |
@@ -62,6 +68,7 @@ struct rt_task { | |||
62 | unsigned int priority; | 68 | unsigned int priority; |
63 | task_class_t cls; | 69 | task_class_t cls; |
64 | budget_policy_t budget_policy; /* ignored by pfair */ | 70 | budget_policy_t budget_policy; /* ignored by pfair */ |
71 | budget_signal_policy_t budget_signal_policy; /* currently ignored by pfair */ | ||
65 | }; | 72 | }; |
66 | 73 | ||
67 | union np_flag { | 74 | union np_flag { |
@@ -118,8 +125,15 @@ struct rt_job { | |||
118 | * Increase this sequence number when a job is released. | 125 | * Increase this sequence number when a job is released. |
119 | */ | 126 | */ |
120 | unsigned int job_no; | 127 | unsigned int job_no; |
128 | |||
129 | /* bits: | ||
130 | * 0th: Set if a budget exhaustion signal has already been sent for | ||
131 | * the current job. */ | ||
132 | unsigned long flags; | ||
121 | }; | 133 | }; |
122 | 134 | ||
135 | #define RT_JOB_SIG_BUDGET_SENT 0 | ||
136 | |||
123 | struct pfair_param; | 137 | struct pfair_param; |
124 | 138 | ||
125 | /* RT task parameters for scheduling extensions | 139 | /* RT task parameters for scheduling extensions |