diff options
Diffstat (limited to 'src/mem/packet.hh')
-rw-r--r-- | src/mem/packet.hh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh index 94508f697..32c4cf631 100644 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@ -502,7 +502,15 @@ class Packet : public Printable bool isUpgrade() const { return cmd.isUpgrade(); } bool isRequest() const { return cmd.isRequest(); } bool isResponse() const { return cmd.isResponse(); } - bool needsWritable() const { return cmd.needsWritable(); } + bool needsWritable() const + { + // we should never check if a response needsWritable, the + // request has this flag, and for a response we should rather + // look at the hasSharers flag (if not set, the response is to + // be considered writable) + assert(isRequest()); + return cmd.needsWritable(); + } bool needsResponse() const { return cmd.needsResponse(); } bool isInvalidate() const { return cmd.isInvalidate(); } bool isEviction() const { return cmd.isEviction(); } |