diff options
author | William A. Kennington III <wak@google.com> | 2018-10-19 17:29:46 -0700 |
---|---|---|
committer | William A. Kennington III <wak@google.com> | 2018-10-29 15:59:03 -0700 |
commit | 1cfc2f11b13412a15f8478cebc35e50e6feb13a2 (patch) | |
tree | 05986154355a3d6c0667368c12cf34d7ad97d4cd /control/zone.cpp | |
parent | 5882e0c0593edaf464eea960f1ab7b2f5cd10240 (diff) | |
download | phosphor-fan-presence-1cfc2f11b13412a15f8478cebc35e50e6feb13a2.tar.gz phosphor-fan-presence-1cfc2f11b13412a15f8478cebc35e50e6feb13a2.zip |
Switch sd_event loops to sdeventplus
This change is mostly focused around plumbing the sdeventplus::Event
object everywhere and using the member functions provided for the event.
No migration to the timer utility is performed yet.
Change-Id: I912ab82bc081239d3b7c3cf7c5caca6742ef9c87
Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'control/zone.cpp')
-rw-r--r-- | control/zone.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/control/zone.cpp b/control/zone.cpp index f4c50d9..0050899 100644 --- a/control/zone.cpp +++ b/control/zone.cpp @@ -37,7 +37,7 @@ using InternalFailure = sdbusplus::xyz::openbmc_project::Common:: Zone::Zone(Mode mode, sdbusplus::bus::bus& bus, - phosphor::fan::event::EventPtr& events, + const sdeventplus::Event& event, const ZoneDefinition& def) : _bus(bus), _fullSpeed(std::get<fullSpeedPos>(def)), @@ -46,9 +46,9 @@ Zone::Zone(Mode mode, _defCeilingSpeed(std::get<fullSpeedPos>(def)), _incDelay(std::get<incDelayPos>(def)), _decInterval(std::get<decIntervalPos>(def)), - _incTimer(events, [this](){ this->incTimerExpired(); }), - _decTimer(events, [this](){ this->decTimerExpired(); }), - _sdEvents(events) + _incTimer(event, [this](){ this->incTimerExpired(); }), + _decTimer(event, [this](){ this->decTimerExpired(); }), + _eventLoop(event) { auto& fanDefs = std::get<fanListPos>(def); @@ -347,7 +347,7 @@ void Zone::initEvent(const SetSpeedEvent& event) ); std::unique_ptr<util::Timer> timer = std::make_unique<util::Timer>( - _sdEvents, + _eventLoop, [this, action = &(std::get<actionsPos>(event)), group = &(std::get<groupPos>(event))]() |