summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/resource_pool.hh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-05-26 09:23:13 -0700
committerNathan Binkert <nate@binkert.org>2009-05-26 09:23:13 -0700
commit47877cf2dbd6ee2f1cf9b2c609d37b0589e876ca (patch)
tree6beb00dfe7e31b9bf82f7aba4710b0c487b6543f /src/cpu/inorder/resource_pool.hh
parentd93392df28fc6c9a5c70fb6252a12afdc72d9344 (diff)
downloadgem5-47877cf2dbd6ee2f1cf9b2c609d37b0589e876ca.tar.xz
types: add a type for thread IDs and try to use it everywhere
Diffstat (limited to 'src/cpu/inorder/resource_pool.hh')
-rw-r--r--src/cpu/inorder/resource_pool.hh19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/cpu/inorder/resource_pool.hh b/src/cpu/inorder/resource_pool.hh
index 42a07390c..016fae2bf 100644
--- a/src/cpu/inorder/resource_pool.hh
+++ b/src/cpu/inorder/resource_pool.hh
@@ -81,7 +81,7 @@ class ResourcePool {
int stageNum;
- unsigned tid;
+ ThreadID tid;
public:
/** Constructs a resource event. */
@@ -93,14 +93,14 @@ class ResourcePool {
DynInstPtr _inst,
int stage_num,
InstSeqNum seq_num,
- unsigned _tid);
+ ThreadID _tid);
/** Set Type of Event To Be Scheduled */
void setEvent(InOrderCPU::CPUEventType e_type,
DynInstPtr _inst,
int stage_num,
InstSeqNum seq_num,
- unsigned _tid)
+ ThreadID _tid)
{
eventType = e_type;
inst = _inst;
@@ -153,20 +153,21 @@ class ResourcePool {
ResReqPtr request(int res_idx, DynInstPtr inst);
/** Squash The Resource */
- void squash(DynInstPtr inst, int res_idx, InstSeqNum done_seq_num, int tid);
+ void squash(DynInstPtr inst, int res_idx, InstSeqNum done_seq_num,
+ ThreadID tid);
/** Squash All Resources in Pool after Done Seq. Num */
void squashAll(DynInstPtr inst, int stage_num,
- InstSeqNum done_seq_num, unsigned tid);
+ InstSeqNum done_seq_num, ThreadID tid);
/** Activate Thread in all resources */
- void activateAll(unsigned tid);
+ void activateAll(ThreadID tid);
/** De-Activate Thread in all resources */
- void deactivateAll(unsigned tid);
+ void deactivateAll(ThreadID tid);
/** Broadcast graduation to all resources */
- void instGraduated(InstSeqNum seq_num,unsigned tid);
+ void instGraduated(InstSeqNum seq_num, ThreadID tid);
/** The number of instructions available that a resource can
* can still process.
@@ -178,7 +179,7 @@ class ResourcePool {
/** Schedule resource event, regardless of its current state. */
void scheduleEvent(InOrderCPU::CPUEventType e_type, DynInstPtr inst = NULL,
- int delay = 0, int res_idx = 0, int tid = 0);
+ int delay = 0, int res_idx = 0, ThreadID tid = 0);
/** UnSchedule resource event, regardless of its current state. */
void unscheduleEvent(int res_idx, DynInstPtr inst);