Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c0ab3749 authored by youfa.song's avatar youfa.song Committed by youfa
Browse files

MediaMetrics: Fix wait_until(max) for condition_variable

As TimerClock is system_clock (which is not monotonic), libcxx's
implementation of condition_variable::wait_until(l, std::chrono::time_point)
recalculates the 'until' time into the wait duration and then goes back to the
absolute timestamp when calling pthread_cond_timedwait(); this back-and-forth
calculation sometimes loses the 'max' value because enough time passes in
between, and instead passes incorrect timestamp into the syscall, causing a
crash. Mitigating it by explicitly calling the non-timed wait here.

Change-Id: I1ee491cbf01c5943a3fc7e9e8e4632db1f506571
parent 677708a2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment