diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-06-09 09:21:14 -0400 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-06-09 09:21:14 -0400 |
commit | 737e5da7f6a4716803e489f473fa4d58579fbd58 (patch) | |
tree | 248964ce0698cf00ba66090f6a7dec6c754e0d91 /src/base | |
parent | a9cad92011560fe03c7d6ffde6d679cc84e48816 (diff) | |
download | gem5-737e5da7f6a4716803e489f473fa4d58579fbd58.tar.xz |
base: Reset CircleBuf size on flush()
The flush() method in CircleBuf resets the state of the circular
buffer, but fails to set size to zero. This obviously confuses code
that tries to determine the amount of data in the buffer. Set the size
to zero on flush.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/circlebuf.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/base/circlebuf.cc b/src/base/circlebuf.cc index 06d0075b2..2f04bc16e 100644 --- a/src/base/circlebuf.cc +++ b/src/base/circlebuf.cc @@ -67,6 +67,7 @@ CircleBuf::flush() { _start = 0; _stop = 0; + _size = 0; _rollover = false; } |