summaryrefslogtreecommitdiff
path: root/src/dev/dma_device.hh
diff options
context:
space:
mode:
authorSean Wilson <spwilson2@wisc.edu>2017-06-28 11:29:26 -0500
committerSean Wilson <spwilson2@wisc.edu>2017-07-12 20:07:05 +0000
commit8bcf6a799d8bde90565fd42cf74ada0ec9fbc98f (patch)
treefb5d08efcbdf84acc08fa94526c781b42574e9aa /src/dev/dma_device.hh
parentea57eee60cca92277f9f8d1f2abf501ca158be2e (diff)
downloadgem5-8bcf6a799d8bde90565fd42cf74ada0ec9fbc98f.tar.xz
dev: Refactor some Event subclasses to lambdas
Change-Id: I965d31ff8ad1658b03a902bf4244d7d0977b0466 Signed-off-by: Sean Wilson <spwilson2@wisc.edu> Reviewed-on: https://gem5-review.googlesource.com/3928 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/dev/dma_device.hh')
-rw-r--r--src/dev/dma_device.hh19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/dev/dma_device.hh b/src/dev/dma_device.hh
index f354d3859..0dc79df42 100644
--- a/src/dev/dma_device.hh
+++ b/src/dev/dma_device.hh
@@ -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);
}
};