summaryrefslogtreecommitdiff
path: root/dev/etherint.hh
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2004-11-13 16:33:16 -0500
committerNathan Binkert <binkertn@umich.edu>2004-11-13 16:33:16 -0500
commitacb98fb0f64a3b6a4f2f3151b0d4fb14fdfcf7cf (patch)
tree4daefdaf22007eb42f30043334447de27e8aa7cb /dev/etherint.hh
parentbd3e3c02300312ae8d00ae9abf3fa009a2cddbc7 (diff)
downloadgem5-acb98fb0f64a3b6a4f2f3151b0d4fb14fdfcf7cf.tar.xz
we shouldn't ever pass around references to PacketPtrs,
const references are ok, or pass by value. --HG-- extra : convert_revision : 7280a1c7d22b9294fddbe50f02f6f4c6ca9b2e5b
Diffstat (limited to 'dev/etherint.hh')
-rw-r--r--dev/etherint.hh16
1 files changed, 8 insertions, 8 deletions
diff --git a/dev/etherint.hh b/dev/etherint.hh
index ddfe16d88..bcdf0ae06 100644
--- a/dev/etherint.hh
+++ b/dev/etherint.hh
@@ -31,8 +31,8 @@
* components.
*/
-#ifndef __ETHERINT_HH__
-#define __ETHERINT_HH__
+#ifndef __DEV_ETHERINT_HH__
+#define __DEV_ETHERINT_HH__
#include <string>
@@ -54,13 +54,13 @@ class EtherInt : public SimObject
virtual ~EtherInt() {}
void setPeer(EtherInt *p);
- virtual bool recvPacket(PacketPtr &packet) = 0;
+
void recvDone() { peer->sendDone(); }
- bool sendPacket(PacketPtr &packet)
- {
- return peer ? peer->recvPacket(packet) : true;
- }
virtual void sendDone() = 0;
+
+ bool sendPacket(PacketPtr packet)
+ { return peer ? peer->recvPacket(packet) : true; }
+ virtual bool recvPacket(PacketPtr packet) = 0;
};
-#endif // __ETHERINT_HH__
+#endif // __DEV_ETHERINT_HH__