diff options
author | Sean Wilson <spwilson2@wisc.edu> | 2017-06-28 11:29:26 -0500 |
---|---|---|
committer | Sean Wilson <spwilson2@wisc.edu> | 2017-07-12 20:07:05 +0000 |
commit | 8bcf6a799d8bde90565fd42cf74ada0ec9fbc98f (patch) | |
tree | fb5d08efcbdf84acc08fa94526c781b42574e9aa /src/dev/dma_device.hh | |
parent | ea57eee60cca92277f9f8d1f2abf501ca158be2e (diff) | |
download | gem5-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.hh | 19 |
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); } }; |