Fork from pix106's tree
Find a file
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
core fixing the SSR recovery race condition 2014-07-30 18:02:41 -07:00
etc Add support for XTRA_VERSION_CHECK QMI LOC msg 2014-07-21 10:45:06 -07:00
loc_api fixing the SSR recovery race condition 2014-07-30 18:02:41 -07:00
platform_lib_abstractions hardware/qcom/gps: Enabled Timestamps for on-target logging 2013-07-03 17:09:21 -07:00
utils loc timer util fix to handle the race condition 2014-08-04 10:28:00 -07:00
CleanSpec.mk removed exe bit of the file access mod 2013-04-05 11:12:28 -07:00
configure.ac hardware/qcom/gps: Porting HAL and Loc API 2.0 2013-07-03 17:08:14 -07:00
loc-api.pc.in hardware/qcom/gps: fixing build failure 2013-07-03 17:10:14 -07:00
Makefile.am hardware/qcom/gps: Porting HAL and Loc API 2.0 2013-07-03 17:08:14 -07:00