NaCl: Fix lll_futex_timed_wait timeout calculation.
This commit is contained in:
parent
58007e9e68
commit
f21754707c
@ -1,3 +1,8 @@
|
||||
2015-05-28 Roland McGrath <roland@hack.frob.com>
|
||||
|
||||
* sysdeps/nacl/lowlevellock-futex.h (lll_futex_timed_wait):
|
||||
Add TIMEOUT to current time, don't subtract it.
|
||||
|
||||
2015-05-28 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[BZ #18422]
|
||||
|
@ -48,12 +48,12 @@
|
||||
&& __glibc_likely ((_err = __nacl_irt_clock.clock_gettime \
|
||||
(CLOCK_REALTIME, &_ts)) == 0)) \
|
||||
{ \
|
||||
_ts.tv_sec -= _to->tv_sec; \
|
||||
_ts.tv_nsec -= _to->tv_nsec; \
|
||||
while (_ts.tv_nsec < 0) \
|
||||
_ts.tv_sec += _to->tv_sec; \
|
||||
_ts.tv_nsec += _to->tv_nsec; \
|
||||
while (_ts.tv_nsec >= 1000000000) \
|
||||
{ \
|
||||
_ts.tv_nsec += 1000000000; \
|
||||
--_ts.tv_sec; \
|
||||
_ts.tv_nsec -= 1000000000; \
|
||||
++_ts.tv_sec; \
|
||||
} \
|
||||
_to = &_ts; \
|
||||
} \
|
||||
|
Loading…
x
Reference in New Issue
Block a user