power: apply wait callback mechanism to all state transitions 99/267999/7
authorYoungjae Cho <y0.cho@samsung.com>
Tue, 14 Dec 2021 09:20:25 +0000 (18:20 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Wed, 15 Dec 2021 08:22:51 +0000 (17:22 +0900)
commit1f09cb8d649c8e666683b147109b84ccf6639a0e
tree7c1feb9ad94ab27dfa5a811da907c42bfb56fd7f
parent64c18b3026939e00d3419fea6a54e2d4fd6b2142
power: apply wait callback mechanism to all state transitions

Generalize sleep-wait mechanism. It now always waits on changing state
if some other processes has registered change-state-wait on the state.
On transition to a next state, remove all change-state-waits that
waiting for other than the next state. If a timeout expires or all
change-state-waits are confirmed, invoke wait-done callback.

Change-Id: I573ca68c3a6c210cad479e068ee088d6a31ba54f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
plugins/iot-headless/power/power-dbus.c
plugins/iot-headless/power/power-state-manager.c
plugins/iot-headless/power/power-state-manager.h
plugins/iot-headless/power/power-state-wait.c [new file with mode: 0644]
plugins/iot-headless/power/power-state-wait.h [new file with mode: 0644]
plugins/iot-headless/power/sleep-wait.c [deleted file]
plugins/iot-headless/power/sleep-wait.h [deleted file]
src/shared/device-notifier.h