summaryrefslogtreecommitdiff
path: root/automotive/vehicle/aidl/impl/utils/common/include/RecurrentTimer.h
AgeCommit message (Collapse)Author
2022-12-09Avoid holding lock while calling recurrent actions.Yu Shan
This CL fixes a dead lock issue caused by RecurrentTimer holding internal locks while calling actions. The dead lock is caused by the following situation: 1. Caller holds a lock, call RecurrentTimer.registerCallback which waits for RecurrentTimer's lock. 2. Another recurrent action happens at the same time. Recurrent timer holds lock before calling the client action. The client action is now waiting for the lock that is currently hold by 1. Test: atest RecurrentTimerTest Bug: 255574557 Change-Id: I3999f4e9cdf581cb851d5f49341dbcc0c160f234 (cherry picked from commit 93a821077effec224d3880875d98c13ef1787e4c)
2022-04-06Update subscription logic for VHAL ref impl.Yu Shan
Update the implementation for subscription logic. Add clearer documentation for sampleRate and timestamp behavior. The sampleRate specified in subscribeOptions is just a guidance to tell VHAL what the polling rate could be. For timestamp, the timestamp returned for each property must be the timestamp when that property is updated, not when the property is retrieved. Test: atest FakeVehicleHardwareTest Bug: 225191802, 226000926 Change-Id: I1e886133258236eedfa7fcffe5c4fb49aead4f6f