Skip to content
Commit 372b9347 authored by Ram Chandrasekar's avatar Ram Chandrasekar
Browse files

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
parent a89618d0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment