summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2009-03-04 13:16:49 -0500
committerKorey Sewell <ksewell@umich.edu>2009-03-04 13:16:49 -0500
commit846f953c2bc8f9922afe62c30e60f9b5b531d09e (patch)
treeb9c325f5d90232b1b6def93e212344698df49b67 /src/base
parente4aa4ca40c0a5ab5946914cc997e0a9bd288c861 (diff)
downloadgem5-846f953c2bc8f9922afe62c30e60f9b5b531d09e.tar.xz
Give TimeBuffer an ID that can be set. Necessary because InOrder uses generic stages so w/o an ID there is no way to differentiate buffers when debugging
Diffstat (limited to 'src/base')
-rw-r--r--src/base/timebuf.hh13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/base/timebuf.hh b/src/base/timebuf.hh
index 348f7a673..9f9fc32b5 100644
--- a/src/base/timebuf.hh
+++ b/src/base/timebuf.hh
@@ -43,6 +43,7 @@ class TimeBuffer
int past;
int future;
int size;
+ int _id;
char *data;
std::vector<char *> index;
@@ -148,6 +149,8 @@ class TimeBuffer
new (ptr) T;
ptr += sizeof(T);
}
+
+ _id = -1;
}
TimeBuffer()
@@ -162,6 +165,16 @@ class TimeBuffer
delete [] data;
}
+ void id(int id)
+ {
+ _id = id;
+ }
+
+ int id()
+ {
+ return _id;
+ }
+
void
advance()
{