summaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
Diffstat (limited to 'dev')
-rw-r--r--dev/alpha_console.cc4
-rw-r--r--dev/alpha_console.hh4
-rw-r--r--dev/etherbus.cc2
-rw-r--r--dev/etherbus.hh2
-rw-r--r--dev/etherdump.cc2
-rw-r--r--dev/etherdump.hh4
-rw-r--r--dev/etherint.hh4
-rw-r--r--dev/etherlink.cc2
-rw-r--r--dev/etherlink.hh4
-rw-r--r--dev/ethertap.cc2
-rw-r--r--dev/ethertap.hh2
11 files changed, 16 insertions, 16 deletions
diff --git a/dev/alpha_console.cc b/dev/alpha_console.cc
index 89e121ed3..9411c6470 100644
--- a/dev/alpha_console.cc
+++ b/dev/alpha_console.cc
@@ -74,7 +74,7 @@ AlphaConsole::AlphaConsole(const string &name, SimConsole *cons,
}
Fault
-AlphaConsole::read(MemReqPtr req, uint8_t *data)
+AlphaConsole::read(MemReqPtr &req, uint8_t *data)
{
memset(data, 0, req->size);
uint64_t val;
@@ -110,7 +110,7 @@ AlphaConsole::read(MemReqPtr req, uint8_t *data)
}
Fault
-AlphaConsole::write(MemReqPtr req, const uint8_t *data)
+AlphaConsole::write(MemReqPtr &req, const uint8_t *data)
{
uint64_t val;
diff --git a/dev/alpha_console.hh b/dev/alpha_console.hh
index 105b03849..4647be538 100644
--- a/dev/alpha_console.hh
+++ b/dev/alpha_console.hh
@@ -95,8 +95,8 @@ class AlphaConsole : public MmapDevice
/**
* memory mapped reads and writes
*/
- virtual Fault read(MemReqPtr req, uint8_t *data);
- virtual Fault write(MemReqPtr req, const uint8_t *data);
+ virtual Fault read(MemReqPtr &req, uint8_t *data);
+ virtual Fault write(MemReqPtr &req, const uint8_t *data);
/**
* standard serialization routines for checkpointing
diff --git a/dev/etherbus.cc b/dev/etherbus.cc
index 3f6036f72..76697dd3e 100644
--- a/dev/etherbus.cc
+++ b/dev/etherbus.cc
@@ -81,7 +81,7 @@ EtherBus::reg(EtherInt *dev)
{ devlist.push_back(dev); }
bool
-EtherBus::send(EtherInt *sndr, PacketPtr pkt)
+EtherBus::send(EtherInt *sndr, PacketPtr &pkt)
{
if (busy()) {
DPRINTF(Ethernet, "ethernet packet not sent, bus busy\n", curTick);
diff --git a/dev/etherbus.hh b/dev/etherbus.hh
index f7f633303..9ef477808 100644
--- a/dev/etherbus.hh
+++ b/dev/etherbus.hh
@@ -73,7 +73,7 @@ class EtherBus : public SimObject
void txDone();
void reg(EtherInt *dev);
bool busy() const { return (bool)packet; }
- bool send(EtherInt *sender, PacketPtr packet);
+ bool send(EtherInt *sender, PacketPtr &packet);
};
#endif // __ETHERBUS_H__
diff --git a/dev/etherdump.cc b/dev/etherdump.cc
index 89f1ce382..6d86adc32 100644
--- a/dev/etherdump.cc
+++ b/dev/etherdump.cc
@@ -106,7 +106,7 @@ EtherDump::init()
}
void
-EtherDump::dumpPacket(PacketPtr packet)
+EtherDump::dumpPacket(PacketPtr &packet)
{
pcap_pkthdr pkthdr;
pkthdr.ts.tv_sec = curtime + (curTick / s_freq);
diff --git a/dev/etherdump.hh b/dev/etherdump.hh
index b3aefeb74..e22b66166 100644
--- a/dev/etherdump.hh
+++ b/dev/etherdump.hh
@@ -44,7 +44,7 @@ class EtherDump : public SimObject
{
private:
std::ofstream stream;
- void dumpPacket(PacketPtr packet);
+ void dumpPacket(PacketPtr &packet);
void init();
Tick curtime;
@@ -54,7 +54,7 @@ class EtherDump : public SimObject
public:
EtherDump(const std::string &name, const std::string &file);
- inline void dump(PacketPtr pkt) { if (stream.is_open()) dumpPacket(pkt); }
+ inline void dump(PacketPtr &pkt) { if (stream.is_open()) dumpPacket(pkt); }
};
#endif // __ETHERDUMP_H__
diff --git a/dev/etherint.hh b/dev/etherint.hh
index dfc9f6fd6..70e29eb7c 100644
--- a/dev/etherint.hh
+++ b/dev/etherint.hh
@@ -54,9 +54,9 @@ class EtherInt : public SimObject
virtual ~EtherInt() {}
void setPeer(EtherInt *p);
- virtual bool recvPacket(PacketPtr packet) = 0;
+ virtual bool recvPacket(PacketPtr &packet) = 0;
void recvDone() { peer->sendDone(); }
- bool sendPacket(PacketPtr packet)
+ bool sendPacket(PacketPtr &packet)
{
return peer ? peer->recvPacket(packet) : true;
}
diff --git a/dev/etherlink.cc b/dev/etherlink.cc
index c042cac34..676b1da1c 100644
--- a/dev/etherlink.cc
+++ b/dev/etherlink.cc
@@ -102,7 +102,7 @@ EtherLink::Link::txDone()
}
bool
-EtherLink::Link::transmit(PacketPtr pkt)
+EtherLink::Link::transmit(PacketPtr &pkt)
{
if (busy()) {
DPRINTF(Ethernet, "EtherLink packet not sent, link busy\n");
diff --git a/dev/etherlink.hh b/dev/etherlink.hh
index ef587faf7..895bac2e1 100644
--- a/dev/etherlink.hh
+++ b/dev/etherlink.hh
@@ -92,7 +92,7 @@ class EtherLink : public SimObject
virtual std::string name() const { return objName; }
bool busy() const { return (bool)packet; }
- bool transmit(PacketPtr packet);
+ bool transmit(PacketPtr &packet);
void setTxInt(Interface *i) { assert(!txint); txint = i; }
void setRxInt(Interface *i) { assert(!rxint); rxint = i; }
@@ -108,7 +108,7 @@ class EtherLink : public SimObject
public:
Interface(const std::string &name, Link *txlink, Link *rxlink);
- bool recvPacket(PacketPtr packet) { return txlink->transmit(packet); }
+ bool recvPacket(PacketPtr &packet) { return txlink->transmit(packet); }
void sendDone() { }
};
diff --git a/dev/ethertap.cc b/dev/ethertap.cc
index 339e7ac78..960d21d73 100644
--- a/dev/ethertap.cc
+++ b/dev/ethertap.cc
@@ -169,7 +169,7 @@ EtherTap::detach()
}
bool
-EtherTap::recvPacket(PacketPtr packet)
+EtherTap::recvPacket(PacketPtr &packet)
{
if (dump)
dump->dump(packet);
diff --git a/dev/ethertap.hh b/dev/ethertap.hh
index e2b1f640f..0b853a11d 100644
--- a/dev/ethertap.hh
+++ b/dev/ethertap.hh
@@ -94,7 +94,7 @@ class EtherTap : public EtherInt
EtherTap(const std::string &name, EtherDump *dump, int port, int bufsz);
virtual ~EtherTap();
- virtual bool recvPacket(PacketPtr packet);
+ virtual bool recvPacket(PacketPtr &packet);
virtual void sendDone();
virtual void serialize(std::ostream &os);