From: Nathan Binkert Date: Sat, 13 Mar 2010 01:31:08 +0000 (-0800) Subject: packet: add a method to set the size X-Git-Tag: stable_2012_02_02~1476 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c8f296bca08a34947cf020046964a888b66acbb5;p=gem5.git packet: add a method to set the size --- diff --git a/src/mem/packet.hh b/src/mem/packet.hh index c58862270..e7a5335a8 100644 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@ -590,6 +590,15 @@ class Packet : public FastAlloc, public Printable setDest(Broadcast); } + void + setSize(unsigned size) + { + assert(!flags.isSet(VALID_SIZE)); + + this->size = size; + flags.set(VALID_SIZE); + } + /** * Set the data pointer to the following value that should not be