diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-02-28 06:13:35 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-02-28 06:13:35 -0500 |
commit | f7360d5bca61baf4539698faf08fc36113c4fb33 (patch) | |
tree | 1551252d2ea703d26c39eddcd21e752eb94a148c /dev/pktfifo.hh | |
parent | 299efffaf5eb5fb55b2109a643e1e0e985f89ce6 (diff) | |
parent | d207168eda13483a2990cdf060c1a7ead42cc9da (diff) | |
download | gem5-f7360d5bca61baf4539698faf08fc36113c4fb33.tar.xz |
Merge gblack@m5.eecs.umich.edu:/bk/multiarch
into ewok.(none):/home/gblack/m5/multiarch
--HG--
extra : convert_revision : 0b3ffc0605c9043d7f5bf6c15f4a3c68846a732a
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 */ |