Files
OpenCellular/include/task.h
Randall Spangler e3c5f77924 link: Fix overflow in hibernate time calculation
The time out value passed to task_wait_event() is signed 32-bit and
thus waiting for 24 hours will cause overflow.  Limit max wait time.

BUG=chrome-os-partner:15797
BRANCH=link

TEST=Disconnect AC, shut down system, and close lid.  From ec console,
do 'hibdelay 8000' and then wait 2.5 hours.  EC should have
hibernated.  (8000 is more than twice the max time for
task_wait_event())

Change-Id: I5fa505554182e8bad6399c12a382ff71bb123d8f
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37095
Reviewed-by: Vic Yang <victoryang@chromium.org>
2012-11-01 10:08:54 -07:00

5.7 KiB