From 47877cf2dbd6ee2f1cf9b2c609d37b0589e876ca Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Tue, 26 May 2009 09:23:13 -0700 Subject: types: add a type for thread IDs and try to use it everywhere --- src/cpu/o3/mem_dep_unit_impl.hh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/cpu/o3/mem_dep_unit_impl.hh') diff --git a/src/cpu/o3/mem_dep_unit_impl.hh b/src/cpu/o3/mem_dep_unit_impl.hh index 8754539f9..59344d9f7 100644 --- a/src/cpu/o3/mem_dep_unit_impl.hh +++ b/src/cpu/o3/mem_dep_unit_impl.hh @@ -54,7 +54,7 @@ MemDepUnit::MemDepUnit(DerivO3CPUParams *params) template MemDepUnit::~MemDepUnit() { - for (int tid=0; tid < Impl::MaxThreads; tid++) { + for (ThreadID tid = 0; tid < Impl::MaxThreads; tid++) { ListIt inst_list_it = instList[tid].begin(); @@ -78,7 +78,7 @@ MemDepUnit::~MemDepUnit() template void -MemDepUnit::init(DerivO3CPUParams *params, int tid) +MemDepUnit::init(DerivO3CPUParams *params, ThreadID tid) { DPRINTF(MemDepUnit, "Creating MemDepUnit %i object.\n",tid); @@ -145,7 +145,7 @@ template void MemDepUnit::insert(DynInstPtr &inst) { - unsigned tid = inst->threadNumber; + ThreadID tid = inst->threadNumber; MemDepEntryPtr inst_entry = new MemDepEntry(inst); @@ -242,7 +242,7 @@ template void MemDepUnit::insertNonSpec(DynInstPtr &inst) { - unsigned tid = inst->threadNumber; + ThreadID tid = inst->threadNumber; MemDepEntryPtr inst_entry = new MemDepEntry(inst); @@ -292,7 +292,7 @@ MemDepUnit::insertBarrier(DynInstPtr &barr_inst) DPRINTF(MemDepUnit, "Inserted a write barrier\n"); } - unsigned tid = barr_inst->threadNumber; + ThreadID tid = barr_inst->threadNumber; MemDepEntryPtr inst_entry = new MemDepEntry(barr_inst); @@ -382,7 +382,7 @@ MemDepUnit::completed(DynInstPtr &inst) "[sn:%lli].\n", inst->readPC(), inst->seqNum); - unsigned tid = inst->threadNumber; + ThreadID tid = inst->threadNumber; // Remove the instruction from the hash and the list. MemDepHashIt hash_it = memDepHash.find(inst->seqNum); @@ -457,7 +457,7 @@ MemDepUnit::wakeDependents(DynInstPtr &inst) template void MemDepUnit::squash(const InstSeqNum &squashed_num, - unsigned tid) + ThreadID tid) { if (!instsToReplay.empty()) { ListIt replay_it = instsToReplay.begin(); @@ -552,7 +552,7 @@ template void MemDepUnit::dumpLists() { - for (unsigned tid=0; tid < Impl::MaxThreads; tid++) { + for (ThreadID tid = 0; tid < Impl::MaxThreads; tid++) { cprintf("Instruction list %i size: %i\n", tid, instList[tid].size()); -- cgit v1.2.3