summaryrefslogtreecommitdiff
path: root/src/mem/packet.hh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2010-03-12 17:31:08 -0800
committerNathan Binkert <nate@binkert.org>2010-03-12 17:31:08 -0800
commitc8f296bca08a34947cf020046964a888b66acbb5 (patch)
treed7f732e236391d64d2ec89f2fe7e8707c91e8fa1 /src/mem/packet.hh
parent671faf33168595590b123d96d0a7223c5c053310 (diff)
downloadgem5-c8f296bca08a34947cf020046964a888b66acbb5.tar.xz
packet: add a method to set the size
Diffstat (limited to 'src/mem/packet.hh')
-rw-r--r--src/mem/packet.hh9
1 files changed, 9 insertions, 0 deletions
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