summaryrefslogtreecommitdiff
path: root/src/mem/bridge.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-07-23 09:32:19 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-07-23 09:32:19 -0400
commit66f5124e2b7db64279f894a0694da3c75b9c157c (patch)
treeac5cf9bbfa23c1a46414fc53c8e3d997116879e8 /src/mem/bridge.hh
parent42596d27e95696e1c9bb0b421ad910091860d11e (diff)
downloadgem5-66f5124e2b7db64279f894a0694da3c75b9c157c.tar.xz
Bridge: Use EventWrapper instead of Event subclass for sendEvent
This class simply cleans up the code by making use of the EventWrapper convenience class to schedule the sendEvent in the bridge ports.
Diffstat (limited to 'src/mem/bridge.hh')
-rw-r--r--src/mem/bridge.hh32
1 files changed, 2 insertions, 30 deletions
diff --git a/src/mem/bridge.hh b/src/mem/bridge.hh
index eefb4d121..cc428e44d 100644
--- a/src/mem/bridge.hh
+++ b/src/mem/bridge.hh
@@ -213,22 +213,8 @@ class Bridge : public MemObject
*/
void trySend();
- /**
- * Private class for scheduling sending of responses from the
- * response queue.
- */
- class SendEvent : public Event
- {
- BridgeSlavePort& port;
-
- public:
- SendEvent(BridgeSlavePort& p) : port(p) {}
- virtual void process() { port.trySend(); }
- virtual const char *description() const { return "bridge send"; }
- };
-
/** Send event for the response queue. */
- SendEvent sendEvent;
+ EventWrapper<BridgeSlavePort, &BridgeSlavePort::trySend> sendEvent;
public:
@@ -322,22 +308,8 @@ class Bridge : public MemObject
*/
void trySend();
- /**
- * Private class for scheduling sending of requests from the
- * request queue.
- */
- class SendEvent : public Event
- {
- BridgeMasterPort& port;
-
- public:
- SendEvent(BridgeMasterPort& p) : port(p) {}
- virtual void process() { port.trySend(); }
- virtual const char *description() const { return "bridge send"; }
- };
-
/** Send event for the request queue. */
- SendEvent sendEvent;
+ EventWrapper<BridgeMasterPort, &BridgeMasterPort::trySend> sendEvent;
public: