Commit 7d9ad8bb authored by tony.ys_liu's avatar tony.ys_liu Committed by Mathieu Chartier
Browse files

Fix false alarm on thread suspend timeout

Root cause:
  CLOCK_REALTIME will jump backward/forward when system time-of-day clock is changed.
  It implies now_abs_ts will jump a lot across end_abs_ts.
  Then, it makes a false alarm (process crash) on thread suspend timeout when doing ComputeRelativeTimeSpec.

      if (ComputeRelativeTimeSpec(&rel_ts, end_abs_ts, now_abs_ts)) {
        return false;  // Timed out.
      }

Solution:
  Use CLOCK_MONOTONIC instead

Bug: 19296054

(cherry picked from commit 071e48ec)

Change-Id: I68fa5afda75e53373e836dd7779821aeb6f1bd46
parent 65370e37
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment