OSDN Git Service

service: Fix BluetoothInterface locking issues
authorJakub Pawlowski <jpawlowski@google.com>
Tue, 26 Jan 2016 03:35:57 +0000 (19:35 -0800)
committerJakub Pawlowski <jpawlowski@google.com>
Tue, 26 Jan 2016 03:59:34 +0000 (03:59 +0000)
commit3c8abb3ef08904ec7605bc81ab20965ea79393a5
treeb3ec2a0a670a31b4075ef5757c76d5d218f7ff4a
parent9c68cdfcbf2220b7c1f30d1d0521775c238ba823
service: Fix BluetoothInterface locking issues

ObserverList class handles adding/removing elements during iteration
by itself, therefore we don't need to do any locking.
Additionally, change lock type to shared for better performance, and
to avoid possible deadlocks that might be caused by calling HAL from
observers.

Change-Id: Ie2e6ff61f6a285e2f9d3dd1ab7ed37985ca31082
service/hal/bluetooth_interface.cpp