diff options
author | Sean Wilson <spwilson2@wisc.edu> | 2017-06-07 16:32:15 -0500 |
---|---|---|
committer | Sean Wilson <spwilson2@wisc.edu> | 2017-06-20 18:03:21 +0000 |
commit | c8668a663992264911545f8001d462e0885b114c (patch) | |
tree | b91e2fd0b64f01f4606b4d3c9efae91623276652 /src/dev/net/i8254xGBe.cc | |
parent | 475f613f2661f3be5f7479c5c7229e5adcb74d93 (diff) | |
download | gem5-c8668a663992264911545f8001d462e0885b114c.tar.xz |
dev: Replace EventWrapper use with EventFunctionWrapper
Change-Id: I6b03cc6f67e76dffb79940431711ae6171901c6a
Signed-off-by: Sean Wilson <spwilson2@wisc.edu>
Reviewed-on: https://gem5-review.googlesource.com/3748
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/dev/net/i8254xGBe.cc')
-rw-r--r-- | src/dev/net/i8254xGBe.cc | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/dev/net/i8254xGBe.cc b/src/dev/net/i8254xGBe.cc index 74379592a..3dde72ac7 100644 --- a/src/dev/net/i8254xGBe.cc +++ b/src/dev/net/i8254xGBe.cc @@ -64,8 +64,12 @@ IGbE::IGbE(const Params *p) pktOffset(0), fetchDelay(p->fetch_delay), wbDelay(p->wb_delay), fetchCompDelay(p->fetch_comp_delay), wbCompDelay(p->wb_comp_delay), rxWriteDelay(p->rx_write_delay), txReadDelay(p->tx_read_delay), - rdtrEvent(this), radvEvent(this), - tadvEvent(this), tidvEvent(this), tickEvent(this), interEvent(this), + rdtrEvent([this]{ rdtrProcess(); }, name()), + radvEvent([this]{ radvProcess(); }, name()), + tadvEvent([this]{ tadvProcess(); }, name()), + tidvEvent([this]{ tidvProcess(); }, name()), + tickEvent([this]{ tick(); }, name()), + interEvent([this]{ delayIntEvent(); }, name()), rxDescCache(this, name()+".RxDesc", p->rx_desc_cache_size), txDescCache(this, name()+".TxDesc", p->tx_desc_cache_size), lastInterrupt(0) @@ -825,8 +829,10 @@ template<class T> IGbE::DescCache<T>::DescCache(IGbE *i, const std::string n, int s) : igbe(i), _name(n), cachePnt(0), size(s), curFetching(0), wbOut(0), moreToWb(false), wbAlignment(0), pktPtr(NULL), - wbDelayEvent(this), fetchDelayEvent(this), fetchEvent(this), - wbEvent(this) + wbDelayEvent([this]{ writeback1(); }, n), + fetchDelayEvent([this]{ fetchDescriptors1(); }, n), + fetchEvent([this]{ fetchComplete(); }, n), + wbEvent([this]{ wbComplete(); }, n) { fetchBuf = new T[size]; wbBuf = new T[size]; @@ -1197,7 +1203,9 @@ IGbE::DescCache<T>::unserialize(CheckpointIn &cp) IGbE::RxDescCache::RxDescCache(IGbE *i, const std::string n, int s) : DescCache<RxDesc>(i, n, s), pktDone(false), splitCount(0), - pktEvent(this), pktHdrEvent(this), pktDataEvent(this) + pktEvent([this]{ pktComplete(); }, n), + pktHdrEvent([this]{ pktSplitDone(); }, n), + pktDataEvent([this]{ pktSplitDone(); }, n) { annSmFetch = "RX Desc Fetch"; @@ -1549,7 +1557,9 @@ IGbE::TxDescCache::TxDescCache(IGbE *i, const std::string n, int s) useTso(false), tsoHeaderLen(0), tsoMss(0), tsoTotalLen(0), tsoUsedLen(0), tsoPrevSeq(0), tsoPktPayloadBytes(0), tsoLoadedHeader(false), tsoPktHasHeader(false), tsoDescBytesUsed(0), tsoCopyBytes(0), tsoPkts(0), - pktEvent(this), headerEvent(this), nullEvent(this) + pktEvent([this]{ pktComplete(); }, n), + headerEvent([this]{ headerComplete(); }, n), + nullEvent([this]{ nullCallback(); }, n) { annSmFetch = "TX Desc Fetch"; annSmWb = "TX Desc Writeback"; |