History log of /system/bt/osi/src/alarm.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1a7856018ab1608a3d681caab4eecd2185ff51f2 08-Jan-2018 Pavlin Radoslavov <pavlin@google.com> Removed alarm callback execution statistics

Updating the alarm state after the callback returns can be problematic
in case the callback itself deleted the alarm.

Bug: 67110137
Test: Manual
Change-Id: Id4de06eebedb792cadd63d09efb68672e9bddc69
Merged-In: Id4de06eebedb792cadd63d09efb68672e9bddc69
(cherry picked from commit 04574e1cde3b0d46b59b4b6ebab935ac60af9f97)
(cherry picked from commit 90ffe3f90a7589e4ff9e5e8bdf353cdcdfe88764)
/system/bt/osi/src/alarm.cc
47616530ceea2ea6432ffb35cd8a3fc0a56365b5 08-Sep-2017 Jakub Pawlowski <jpawlowski@google.com> Fix alarms being posted on wrong thread

Alarms from btu_bta_alarm_queue and btu_generic_alarm_queue should be
processed on the main MessageLoop thread.
Replaced obsoleted alarm_set_on_queue() alarm API with the new
alarm_set_on_mloop() API

Test: manual
Bug: 65078753
Change-Id: I54b472b39b44a6c541dbdcdad7414056d0dd4163
Merged-In: I54b472b39b44a6c541dbdcdad7414056d0dd4163
(cherry picked from commit be8bbd7a83ec8bc900fac58a03010fbcb74956c9)
/system/bt/osi/src/alarm.cc
2b59c4a0843c9f2782cf4163f921eddb31dd6ff9 04-May-2017 Jack He <siyuanh@google.com> Fix broken linux build

* Generic linux does not have property_get_int32. Instead,
osi_property_get_int32() is created to handle OS_GENERIC cases
* Some linux header have sigevent.sigev_notify_attributes typed as
(pthread_attr_t *) whereas others typed it as (void *), as any pointer
can be implicitly casted to (void *), the current casting to (void *)
is unncessary and will break build on systems using (pthread_attr_t *)

Test: make, unit test, no user visible effect
Change-Id: I24b33da453dc9d40656168a3bcd900d9c99219ce
/system/bt/osi/src/alarm.cc
96c42e70f5c6a74a737739aa9c297cd93540f43e 23-Mar-2017 Philip Cuadra <philipcuadra@google.com> Make Bluetooth audio threads use RT scheduling

Bluetooth threads that are used in audio have deadline
requirements for glitchless playback. Those threads need to be
scheduled as RT tasks to ensure that they can meet the deadline even if
there is high system load.

Bug 37518404

Test: play Bluetooth audio, check for RT with systrace
Change-Id: I4505fbce55e5a4fe18d00dbda23646a60e482efd
/system/bt/osi/src/alarm.cc
a8215323a1e6f21c8442943f68f8fbe59a3f9ba6 19-Sep-2016 Kamal Negi <kamaln@codeaurora.org> Set alarm's queue to NULL on alarm expired

Use Case: Repeated BT ON/OFF

Failure: ANR due to race condition between random advertisement
address generation completion(adv_raddr_timer) and BT shutdown.

Steps: SNS Stress testing.

Root Cause: Race condition happens between random advertisement
address generation completion(adv_raddr_timer) and BT shutdown.

Fix: For non-periodic alarms, set alarm's queue to NULL once alarm
expired.

Test: mm -j8

Change-Id: Idf8e2bebdc2ca7621aef06dd5f2075ef2c5fa08c
/system/bt/osi/src/alarm.cc
f2af1c42ccb2f642b241c2261b42d0be61d45438 13-Dec-2016 Jack He <siyuanh@google.com> Replace assert with CHECK from base/logging.h

* Replace assert with CHECK
* Remove all NDEBUG definitions
* Remove hacks for BT_LIBCHROME_NDEBUG
* Removed some removed directories from Makefile such as hcis, brcm, rpc

Coccinelle-assisted:

@@
@@

- #include "base/logging.h"
+ #include <base/logging.h>

@ assert_included @
@@

@ base_logging_included @
@@

@ depends on (assert_included && !(base_logging_included)) @
@@

- #include <assert.h>
+ #include <base/logging.h>

@ depends on (assert_included && base_logging_included) @
@@

- #include <assert.h>

@@
expression E;
@@

- assert(E);
+ CHECK(E);

And a bash script:

for file in $(find . -name "*.cc"); do
spatch --sp-file replace_assert_with_CHECK.cocci --in-place $file
done

The following files are maually edited:
btif/src/btif_config.cc
btif/src/btif_avrcp_audio_track.cc
btif/src/btif_gatt_client.cc
osi/src/data_dispatcher.cc
osi/src/reactor.cc
osi/src/thread.cc
osi/src/fixed_queue.cc
osi/src/list.cc
osi/src/allocation_tracker.cc
osi/src/alarm.cc
osi/test/wakelock_test.cc

Bug: 31781465
Test: Code compilation, Unit Tests, BtStressTest, BtFunhausMetricsTest
Change-Id: I21dc10a45be31665e41441b75b0515ed87523988
/system/bt/osi/src/alarm.cc
21da63773cb7734e699a4dad662b5b84d2f3dfa8 03-Nov-2016 Marie Janssen <jamuraa@google.com> Replace pthread_mutex with std::mutex

In an effort to simplify and reduce errors, replace pthread_mutexes
with std equivalents.

Test: run unit tests & manual sanity checks
Change-Id: I5c33e0b4f4c85133ae4f7415cd19372fc4c7ca1a
/system/bt/osi/src/alarm.cc
dbf75f1762c91ec93179b8d630acbd2e3f9d3dd4 08-Nov-2016 Pavlin Radoslavov <pavlin@google.com> Revert "Replace pthread_mutex with std::mutex"

This reverts commit 4b801825bd90b826fb53d51f497aba87d6d00d8c.

Change-Id: I862272c682409778dce356c8cba497ea4b78b14d
/system/bt/osi/src/alarm.cc
4b801825bd90b826fb53d51f497aba87d6d00d8c 03-Nov-2016 Marie Janssen <jamuraa@google.com> Replace pthread_mutex with std::mutex

In an effort to simplify and reduce errors, replace pthread_mutexes
with std equivalents.

Test: run unit tests & manual sanity checks
Change-Id: Ia6492b0007dca311ebd1579f52b206993b7535fd
/system/bt/osi/src/alarm.cc
b55040cc6448a8847490da807d2b6362aa8cb8d9 19-Oct-2016 Myles Watson <mylesgw@google.com> osi: Apply clang-format

cd osi/
clang-format -i --style=file include/*.h include/socket_utils/* src/*.cc \
src/socket_utils/* src/protos/* test/*

Test: mma -j32
Change-Id: I659e586076f1e2ec8f687cd33f441700b8d1f823
/system/bt/osi/src/alarm.cc
b2a292b5d8df2f359c38b0787bc01181225a9bc9 15-Oct-2016 Pavlin Radoslavov <pavlin@google.com> Renamed most C files to C++: *.c to *.cc

Also:
- Fixed C++ related compilation errors.
- Added missing 'extern "C"' guards in some of the header files.
- Added missing LOCAL_CPP_EXTENSION to Android.mk files.
- Added-back btif/src/btif_mce.cc and bta/mce/bta_mce_* to
btif/Android.mk and bta/Android.mk respectively.
- Fixed the alphabetical ordering of the *.cc files in some
of the Android.mk files.
- Added missing Copyright header to "osi/include/list.h"
- Updated "osi/src/wakelock.cc" to use C++ std::string
instead of dynamic allocation of C-style strings.

Test: code compilation, unit tests, and A2DP streaming
Change-Id: Ia2f7215ed9df32775c701b68fc86b09875b942c7
/system/bt/osi/src/alarm.cc