base: Fix CircularQueue when diffing iterators
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 8 Mar 2019 16:01:20 +0000 (16:01 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 22 Mar 2019 10:01:10 +0000 (10:01 +0000)
commitbbcbde7a924ca1ca58df997cfe9f750c285e5564
treeb185621387765b3749fc939bbc4112e7b7a9852a
parent487ea069be405844e1fcf4aa1ed274b74f601c39
base: Fix CircularQueue when diffing iterators

This patch is fixing CircularQueue iterators' subtraction, in particular
the behaviour when head and tail round multiple times.

Change-Id: Ie79ac8accd30a10cf039cf4def87675b01375d6b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Gabor Dozsa <gabor.dozsa@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17188
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
src/base/circular_queue.hh
src/base/circular_queue.test.cc