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/arch/mips/mt.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/arch/mips/mt.hh') diff --git a/src/arch/mips/mt.hh b/src/arch/mips/mt.hh index d0c333d86..8b4c9f908 100755 --- a/src/arch/mips/mt.hh +++ b/src/arch/mips/mt.hh @@ -109,7 +109,7 @@ forkThread(TC *tc, Fault &fault, int Rd_bits, int Rs, int Rt) int num_threads = bits(tc->readMiscRegNoEffect(MVPConf0), MVPC0_PTC_HI, MVPC0_PTC_LO) + 1; int success = 0; - for (int tid = 0; tid < num_threads && success == 0; tid++) { + for (ThreadID tid = 0; tid < num_threads && success == 0; tid++) { unsigned tid_TCBind = tc->readRegOtherThread(MipsISA::TCBind + Ctrl_Base_DepTag, tid); unsigned tc_bind = tc->readMiscRegNoEffect(MipsISA::TCBind); @@ -181,7 +181,7 @@ yieldThread(TC *tc, Fault &fault, int src_reg, uint32_t yield_mask) { if (src_reg == 0) { unsigned mvpconf0 = tc->readMiscRegNoEffect(MVPConf0); - int num_threads = bits(mvpconf0, MVPC0_PTC_HI, MVPC0_PTC_LO) + 1; + ThreadID num_threads = bits(mvpconf0, MVPC0_PTC_HI, MVPC0_PTC_LO) + 1; int ok = 0; @@ -190,7 +190,7 @@ yieldThread(TC *tc, Fault &fault, int src_reg, uint32_t yield_mask) unsigned cur_vpe = bits(tcbind, TCB_CUR_VPE_HI, TCB_CUR_VPE_LO); unsigned cur_tc = bits(tcbind, TCB_CUR_TC_HI, TCB_CUR_TC_LO); - for (int tid = 0; tid < num_threads; tid++) { + for (ThreadID tid = 0; tid < num_threads; tid++) { unsigned tid_TCStatus = tc->readRegOtherThread(MipsISA::TCStatus + Ctrl_Base_DepTag, tid); unsigned tid_TCHalt = tc->readRegOtherThread(MipsISA::TCHalt + Ctrl_Base_DepTag, -- cgit v1.2.3