Implemented graceful fallback when
timerfd_create is failing for
CLOCK_BOOTTIME_ALARM
Change-Id: I6561be840f37a985104a2766fc4b521d237da3b2
CRs-fixed: 2051787
LocTimer on timeout would currently delete timer delegate.
This meddles into the management of LocTimer::stop() call,
and the order of obj delete needs to be synchronized in a
few different places as a result.
This change lets the delete of the timer delegate obj fold
into the stop() handling, which would be easier to synch.
Change-Id: Ic3e0b3d183dceb9e6e2db4c47ec9d6e296b0c3f6
CRs-Fixed: 916590
Removed tCreate and tAssociate from MsgTask. LocThread
now can optionally take a tCreate method. Associator is
replaced with *firstMsg* option to MsgTask, which is a
more generic option, that can associate or do other set
up job at the create of a MsgTask.
The current MsgTask doesn't use tCreate, which exposes
a slight time window for Location HAL when its MsgTask
is NOT associated to DVM heap but a message delivery to
DVM could be attempted during this time.
Change-Id: Iafd5b91b693baacb9b7064463f8c44f74026f54c
CRs-Fixed: 902350
when a ticking timer is stopped, currently kernel doesn't
get updated with the next immediate timer's interval. As a
result, kernel timer will expire sooner (with the stopped
timer's interval), and the next timer's client is notified
for this expiration.
Change-Id: I0d67d1418cb9bfe7f70ae71252901d4c6bb699b3
CRs-Fixed: 909776
LocTimer::stop() can be called from different threads, which must
be protected. Currently there is a race condition between back to
back stop()'s or expire() + stop() events.
Change-Id: Iae80b78f049a32da87639f813c6f5126b4ccd072
CRs-Fixed: 904627
BOOTTIME_ALARM and BOOTTIME were added to timerfd_create
in kernel version 3.11 and 3.15 respectively.
But for targets still on older kernel version we fallback on MONOTONIC.
CRs-Fixed: 897805
Change-Id: I47d9780d69ce5ee8c183c84baa93ea3c1a00db57
LocTimerWrapper implements loc_timer_start/stop calls for backward
compatibility. There is a race condtiion where the wrapper object
could be deleted by the client thread and expireation handling at
rough the same time, which would have the memory freed twice. Now
they are mutext protected.
Change-Id: I25d7466db88a840a8a09e7a476cface48c91d22e
Timer must be removed from epoll as soon as it expires,
otherwise it continuously expire. Current timer removes
from a different thread, this triggers repeated expire
events until the maintain thread gets to remove it.
Change-Id: Ie523bce5069416521d49bc0178d2cad2dd1f04da
CRs-Fixed: 870568
LocHeap, LocThread, LocTimer, and moved MsgTask to
utils. Also added are LocRankable and LocRunnable
abstract classes.
Change-Id: I76975455d24f2c84a95dcc1b04f79fea562ea5ba
CRs-Fixed: 855222