thermal-hal: Evaluate severity for netlink sample event
Netlink Sample event and Violation event occurs back to back when a threshold or hysteresis is violated or cleared. Since these events happen in two separate threads, there is a possibility that violation event gets executed before the sample event acquires the same mutex. This will make the thermal severity estimation to evaluate based on the old temperature data, since the sample event has not updated the temperature yet. To address the race condition, evaluate severity in the sample event also. This will ensure that the severity is evaluated if the sample event executes later. Change-Id: I61fba0b07a700e0a0619d57a16d4b969e1feb57d
Loading
Please register or sign in to comment