Files
OpenCellular/chip
Myles Watson 16eaf5cfde nrf51: Fix a race condition in hwtimer.c
The check for overflow was originally in __hw_clock_source_read()

If it got interrupted, it would frequently see an overflow, because
"prev_read" would be less than "now".

1 - Use the comparator to check for overflow.
2 - Only check for overflow in the interrupt handler.

BUG=chrome-os-partner:35312
BRANCH=none
TEST=make buildall -j
use the keyboard code to type
use a console command "forcetime", to force the system time to overflow soon.

Signed-off-by: Myles Watson <mylesgw@chromium.org>

Change-Id: I7005724222289ba967e89af0ce8b9ef8f90a4ae4
Reviewed-on: https://chromium-review.googlesource.com/239967
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Tested-by: Myles Watson <mylesgw@chromium.org>
Commit-Queue: Myles Watson <mylesgw@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2015-01-14 03:16:18 +00:00
..
2014-12-15 22:46:13 +00:00
2014-12-23 01:50:25 +00:00
2015-01-08 22:36:31 +00:00