misc: missing override specifier
[gem5.git] / src / dev / dma_device.hh
index f354d3859e0bf54e2e80edd0a8a7d4ce5eb8865d..f556e14e30e97ec14dd4fccdfe8b06b2c8167e02 100644 (file)
@@ -179,8 +179,8 @@ class DmaDevice : public PioDevice
 
     unsigned int cacheBlockSize() const { return sys->cacheLineSize(); }
 
-    BaseMasterPort &getMasterPort(const std::string &if_name,
-                                  PortID idx = InvalidPortID) override;
+    Port &getPort(const std::string &if_name,
+                  PortID idx=InvalidPortID) override;
 
 };
 
@@ -240,22 +240,6 @@ class DmaCallback : public Drainable
         }
     }
 
-    /**
-     * Event invoked by DmaDevice on completion of each chunk.
-     */
-    class DmaChunkEvent : public Event
-    {
-      private:
-        DmaCallback *callback;
-
-      public:
-        DmaChunkEvent(DmaCallback *cb)
-          : Event(Default_Pri, AutoDelete), callback(cb)
-        { }
-
-        void process() { callback->chunkComplete(); }
-    };
-
   public:
 
     /**
@@ -265,7 +249,8 @@ class DmaCallback : public Drainable
     Event *getChunkEvent()
     {
         ++count;
-        return new DmaChunkEvent(this);
+        return new EventFunctionWrapper([this]{ chunkComplete(); }, name(),
+                                        true);
     }
 };