aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/sharedres.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/sharedres.cpp')
-rw-r--r--native/src/sharedres.cpp20
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
228void 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
228typedef std::vector<TaskContention> ClusterContention; 248typedef std::vector<TaskContention> ClusterContention;
229 249
230typedef std::vector<ContentionSet> TaskContention; 250typedef std::vector<ContentionSet> TaskContention;