projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9cad92
)
base: Reset CircleBuf size on flush()
author
Andreas Sandberg
<andreas.sandberg@arm.com>
Tue, 9 Jun 2015 13:21:14 +0000
(09:21 -0400)
committer
Andreas Sandberg
<andreas.sandberg@arm.com>
Tue, 9 Jun 2015 13:21:14 +0000
(09:21 -0400)
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.
src/base/circlebuf.cc
patch
|
blob
|
history
diff --git
a/src/base/circlebuf.cc
b/src/base/circlebuf.cc
index 06d0075b2dea6e67ecc3477ac8d9285623696fa0..2f04bc16e049682ae5c5ccf2e0aba713d90e9ca9 100644
(file)
--- a/
src/base/circlebuf.cc
+++ b/
src/base/circlebuf.cc
@@
-67,6
+67,7
@@
CircleBuf::flush()
{
_start = 0;
_stop = 0;
+ _size = 0;
_rollover = false;
}