diff options
Diffstat (limited to 'native/src/sharedres.cpp')
| -rw-r--r-- | native/src/sharedres.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/native/src/sharedres.cpp b/native/src/sharedres.cpp index a91bfdf..5c8acee 100644 --- a/native/src/sharedres.cpp +++ b/native/src/sharedres.cpp | |||
| @@ -225,6 +225,26 @@ void sort_by_request_length(ClusterResources& resources) | |||
| 225 | apply_foreach(resources, sort_by_request_length); | 225 | apply_foreach(resources, sort_by_request_length); |
| 226 | } | 226 | } |
| 227 | 227 | ||
| 228 | void determine_priority_ceilings(const Resources& resources, | ||
| 229 | PriorityCeilings& ceilings) | ||
| 230 | { | ||
| 231 | ceilings.reserve(resources.size()); | ||
| 232 | |||
| 233 | foreach(resources, it) | ||
| 234 | { | ||
| 235 | unsigned int ceiling = UINT_MAX; | ||
| 236 | const ContentionSet& cs = *it; | ||
| 237 | |||
| 238 | foreach(cs, jt) | ||
| 239 | { | ||
| 240 | const RequestBound* req = *jt; | ||
| 241 | ceiling = std::min(ceiling, req->get_task()->get_priority()); | ||
| 242 | } | ||
| 243 | |||
| 244 | ceilings.push_back(ceiling); | ||
| 245 | } | ||
| 246 | } | ||
| 247 | |||
| 228 | typedef std::vector<TaskContention> ClusterContention; | 248 | typedef std::vector<TaskContention> ClusterContention; |
| 229 | 249 | ||
| 230 | typedef std::vector<ContentionSet> TaskContention; | 250 | typedef std::vector<ContentionSet> TaskContention; |
