From 8bcf6a799d8bde90565fd42cf74ada0ec9fbc98f Mon Sep 17 00:00:00 2001 From: Sean Wilson Date: Wed, 28 Jun 2017 11:29:26 -0500 Subject: dev: Refactor some Event subclasses to lambdas Change-Id: I965d31ff8ad1658b03a902bf4244d7d0977b0466 Signed-off-by: Sean Wilson Reviewed-on: https://gem5-review.googlesource.com/3928 Maintainer: Andreas Sandberg Reviewed-by: Jason Lowe-Power Reviewed-by: Andreas Sandberg --- src/dev/uart8250.hh | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'src/dev/uart8250.hh') diff --git a/src/dev/uart8250.hh b/src/dev/uart8250.hh index ccccac1e9..b7fefc534 100644 --- a/src/dev/uart8250.hh +++ b/src/dev/uart8250.hh @@ -73,20 +73,11 @@ class Uart8250 : public Uart uint8_t IER, DLAB, LCR, MCR; Tick lastTxInt; - class IntrEvent : public Event - { - protected: - Uart8250 *uart; - int intrBit; - public: - IntrEvent(Uart8250 *u, int bit); - virtual void process(); - virtual const char *description() const; - void scheduleIntr(); - }; - - IntrEvent txIntrEvent; - IntrEvent rxIntrEvent; + void processIntrEvent(int intrBit); + void scheduleIntr(Event *event); + + EventFunctionWrapper txIntrEvent; + EventFunctionWrapper rxIntrEvent; public: typedef Uart8250Params Params; -- cgit v1.2.3