summaryrefslogtreecommitdiff
path: root/src/cpu/ozone
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2006-12-20 22:20:11 -0800
committerNathan Binkert <binkertn@umich.edu>2006-12-20 22:20:11 -0800
commit9aecfb3e3bfe1b85db9468bad287f22a2eb9bd4e (patch)
treed4b2cbff99ca89ea77011552ab5e57b2435b1326 /src/cpu/ozone
parent4b3538b609cfcce0891ee5ef7d690646a6030166 (diff)
downloadgem5-9aecfb3e3bfe1b85db9468bad287f22a2eb9bd4e.tar.xz
don't use (*activeThreads).begin(), use activeThreads->blah().
Also don't call (*activeThreads).end() over and over. Just call activeThreads->end() once and save the result. Make sure we always check that there are elements in the list before we grab the first one. --HG-- extra : convert_revision : d769d8ed52da99532d57a9bbc93e92ddf22b7e58
Diffstat (limited to 'src/cpu/ozone')
-rw-r--r--src/cpu/ozone/inst_queue_impl.hh16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/cpu/ozone/inst_queue_impl.hh b/src/cpu/ozone/inst_queue_impl.hh
index 32a940241..84f2b2a19 100644
--- a/src/cpu/ozone/inst_queue_impl.hh
+++ b/src/cpu/ozone/inst_queue_impl.hh
@@ -342,16 +342,18 @@ void
InstQueue<Impl>::resetEntries()
{
if (iqPolicy != Dynamic || numThreads > 1) {
- int active_threads = (*activeThreads).size();
+ int active_threads = activeThreads->size();
- list<unsigned>::iterator threads = (*activeThreads).begin();
- list<unsigned>::iterator list_end = (*activeThreads).end();
+ std::list<unsigned>::iterator threads = activeThreads->begin();
+ std::list<unsigned>::iterator end = activeThreads->end();
+
+ while (threads != end) {
+ unsigned tid = *threads++;
- while (threads != list_end) {
if (iqPolicy == Partitioned) {
- maxEntries[*threads++] = numEntries / active_threads;
- } else if(iqPolicy == Threshold && active_threads == 1) {
- maxEntries[*threads++] = numEntries;
+ maxEntries[tid] = numEntries / active_threads;
+ } else if (iqPolicy == Threshold && active_threads == 1) {
+ maxEntries[tid] = numEntries;
}
}
}