diff options
Diffstat (limited to 'native/src/edf/qpa.cpp')
| -rw-r--r-- | native/src/edf/qpa.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/native/src/edf/qpa.cpp b/native/src/edf/qpa.cpp index 23865ca..f138b7c 100644 --- a/native/src/edf/qpa.cpp +++ b/native/src/edf/qpa.cpp | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | #include <set> | 2 | #include <set> |
| 3 | 3 | ||
| 4 | #include <stdlib.h> | 4 | #include <stdlib.h> |
| 5 | #include <limits.h> | ||
| 6 | |||
| 5 | #include "tasks.h" | 7 | #include "tasks.h" |
| 6 | #include "math-helper.h" | 8 | #include "math-helper.h" |
| 7 | #include "stl-helper.h" | 9 | #include "stl-helper.h" |
| @@ -134,16 +136,17 @@ static integral_t get_largest_testpoint(const TaskSet &ts, | |||
| 134 | 136 | ||
| 135 | bool QPATest::is_schedulable(const TaskSet &ts, bool check_preconditions) | 137 | bool QPATest::is_schedulable(const TaskSet &ts, bool check_preconditions) |
| 136 | { | 138 | { |
| 137 | integral_t max_interval = edf_busy_interval(ts); | ||
| 138 | unsigned long min_interval = min_relative_deadline(ts); | ||
| 139 | |||
| 140 | fractional_t util; | 139 | fractional_t util; |
| 141 | ts.get_utilization(util); | 140 | ts.get_utilization(util); |
| 142 | 141 | ||
| 142 | if (util > 1) | ||
| 143 | return false; | ||
| 144 | |||
| 145 | integral_t max_interval = edf_busy_interval(ts); | ||
| 146 | unsigned long min_interval = min_relative_deadline(ts); | ||
| 147 | |||
| 143 | if (util < 1) | 148 | if (util < 1) |
| 144 | max_interval = std::min(max_interval, zhang_burns_interval(ts)); | 149 | max_interval = std::min(max_interval, zhang_burns_interval(ts)); |
| 145 | else if (util > 1) | ||
| 146 | return false; | ||
| 147 | 150 | ||
| 148 | integral_t next = get_largest_testpoint(ts, max_interval); | 151 | integral_t next = get_largest_testpoint(ts, max_interval); |
| 149 | integral_t demand; | 152 | integral_t demand; |
