diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-02-28 06:03:57 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-02-28 06:03:57 -0500 |
commit | d207168eda13483a2990cdf060c1a7ead42cc9da (patch) | |
tree | 18383564b534a5fe6a7ba73bdc179fa249788013 /dev/pktfifo.hh | |
parent | e5f75c2549d4881284202208c09e881886f4fdd4 (diff) | |
parent | 29f50d934549f10b073a5492bd0d441d71534ace (diff) | |
download | gem5-d207168eda13483a2990cdf060c1a7ead42cc9da.tar.xz |
Merge zizzer.eecs.umich.edu:/z/m5/Bitkeeper/m5
into zizzer.eecs.umich.edu:/z/m5/Bitkeeper/multiarch
--HG--
extra : convert_revision : 3a3ff8fcf472db385219a00ae434d1f3fea43b18
Diffstat (limited to 'dev/pktfifo.hh')
-rw-r--r-- | dev/pktfifo.hh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/dev/pktfifo.hh b/dev/pktfifo.hh index e63fd291f..e245840a8 100644 --- a/dev/pktfifo.hh +++ b/dev/pktfifo.hh @@ -127,6 +127,35 @@ class PacketFifo fifo.erase(i); } + bool copyout(void *dest, int offset, int len); + + int countPacketsBefore(iterator end) + { + iterator i = fifo.begin(); + int count = 0; + + while (i != end) { + ++count; + ++i; + } + + return count; + } + + int countPacketsAfter(iterator i) + { + iterator end = fifo.end(); + int count = 0; + + while (i != end) { + ++count; + ++i; + } + + return count; + } + + /** * Serialization stuff */ |