summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2007-07-17 06:23:11 -0700
committerSteve Reinhardt <stever@eecs.umich.edu>2007-07-17 06:23:11 -0700
commitff13827ccb559890f05b2e1d97bc6ecf86f9dd16 (patch)
tree0644714dc319b22cda0fca250c27923a0f220ce2 /src/mem
parentf67c8b33cc57d38b102154c540456ee2c0444e63 (diff)
downloadgem5-ff13827ccb559890f05b2e1d97bc6ecf86f9dd16.tar.xz
Assert that an mshr has a target in getTarget().
--HG-- extra : convert_revision : 08091670fc319876012ed139fcd2584c364a980c
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/cache/miss/mshr.hh14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mem/cache/miss/mshr.hh b/src/mem/cache/miss/mshr.hh
index 293f290b8..a27f465aa 100644
--- a/src/mem/cache/miss/mshr.hh
+++ b/src/mem/cache/miss/mshr.hh
@@ -182,10 +182,16 @@ public:
TargetList* getTargetList() { return &targets; }
/**
+ * Returns true if there are targets left.
+ * @return true if there are targets
+ */
+ bool hasTargets() { return !targets.empty(); }
+
+ /**
* Returns a reference to the first target.
* @return A pointer to the first target.
*/
- Target *getTarget() { return &targets.front(); }
+ Target *getTarget() { assert(hasTargets()); return &targets.front(); }
/**
* Pop first target.
@@ -196,12 +202,6 @@ public:
targets.pop_front();
}
- /**
- * Returns true if there are targets left.
- * @return true if there are targets
- */
- bool hasTargets() { return !targets.empty(); }
-
bool isSimpleForward()
{
if (getNumTargets() != 1)