android_device_xiaomi_sdm66.../utils
Kevin Tang 33e5fd9015 loc timer util fix to handle the race condition
loc timer util stop() routine may have race condition
with the timer thread, when timer expires at the same
time stop() routine tries to lock mutex.  The race
condition can go 2 ways:
* timer thread expires, unlocks mutex, context switch,
stop() thread acquires lock, context switch, timer
thread destroys mutex.  Destroy will fail, resulting
mutex leak.
* timer thread expires, unlocks mutex, destroys mutex,
stop() acqures lock, signal, and releases lock. Would
be super rare conditions though.

Fix is that we give 5 seconds for stop() thread to
give up the lock when destroy. After that the timer
thread will release the mutex and go on destroy.
Meanwhile the stop() thread would check the lock
return to move on with signal and unlock.

Change-Id: Iff9e34d08a1faf0828049de2fede2e7a5d15b161
CRs-Fixed: 699856
2014-08-04 10:28:00 -07:00
..
Android.mk Revert "Avoid GPS build for MSM8916 64bit" 2014-05-07 17:12:49 -07:00
linked_list.c hardware/qcom/gps: Porting HAL and Loc API 2.0 2013-07-03 17:08:14 -07:00
linked_list.h Merge branch jb_mr1 into jb_2.6 2013-06-11 14:58:24 -07:00
loc_cfg.cpp Add new utilities 2014-02-10 10:15:54 -08:00
loc_cfg.h Add new utilities 2014-02-10 10:15:54 -08:00
loc_log.cpp Force logging level to warning for user builds 2014-02-04 10:00:25 -08:00
loc_log.h A mechanism to detect APQ chip set 2013-08-02 19:01:02 -07:00
loc_misc_utils.cpp Add new utilities 2014-02-10 10:15:54 -08:00
loc_misc_utils.h Add new utilities 2014-02-10 10:15:54 -08:00
loc_target.cpp Merge "apq8084: qca1530 detection property changed" 2014-02-13 02:23:15 -08:00
loc_target.h Add new utilities 2014-02-10 10:15:54 -08:00
loc_timer.c loc timer util fix to handle the race condition 2014-08-04 10:28:00 -07:00
loc_timer.h added timer stop api 2013-11-26 12:07:02 -08:00
log_util.h a change to support c++11 2014-04-09 13:24:05 -07:00
Makefile.am hardware/qcom/gps: Porting HAL and Loc API 2.0 2013-07-03 17:08:14 -07:00
msg_q.c made a convenient msg_q_init2 2013-07-23 20:12:54 -06:00
msg_q.h made a convenient msg_q_init2 2013-07-23 20:12:54 -06:00