changeset 6921ec2e77c4 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=6921ec2e77c4
description:
        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:

 src/mem/bridge.hh |  32 ++------------------------------
 1 files changed, 2 insertions(+), 30 deletions(-)

diffs (51 lines):

diff -r 6e40da21a0e6 -r 6921ec2e77c4 src/mem/bridge.hh
--- a/src/mem/bridge.hh Mon Jul 23 00:39:12 2012 -0400
+++ b/src/mem/bridge.hh Mon Jul 23 09:32:19 2012 -0400
@@ -213,22 +213,8 @@
          */
         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 @@
          */
         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:
 
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to