This patch makes the queue implementation in the SimpleTimingPort
private to avoid confusion with the protected member queue in the
QueuedSlavePort. The SimpleTimingPort provides the queue_impl to the
QueuedSlavePort and it can be accessed via the reference in the base
class. The use of the member name queue is thus no longer overloaded.
SimpleTimingPort::SimpleTimingPort(const std::string& _name,
MemObject* _owner) :
- QueuedSlavePort(_name, _owner, queue), queue(*_owner, *this)
+ QueuedSlavePort(_name, _owner, queueImpl), queueImpl(*_owner, *this)
{
}
class SimpleTimingPort : public QueuedSlavePort
{
- protected:
+ private:
- /** The packet queue used to store outgoing responses. */
- SlavePacketQueue queue;
+ /**
+ * The packet queue used to store outgoing responses. Note that
+ * the queue is made private and that we avoid overloading the
+ * name used in the QueuedSlavePort. Access is provided through
+ * the queue reference in the base class.
+ */
+ SlavePacketQueue queueImpl;
+
+ protected:
/** Implemented using recvAtomic(). */
void recvFunctional(PacketPtr pkt);