This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.21-413-gf217547
- From: roland at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 28 May 2015 22:37:04 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.21-413-gf217547
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via f21754707cf42f18523aafdaad88b8ef3c317e37 (commit)
from 58007e9e68913290b1f4f73afc1055f779a8ed5d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f21754707cf42f18523aafdaad88b8ef3c317e37
commit f21754707cf42f18523aafdaad88b8ef3c317e37
Author: Roland McGrath <roland@hack.frob.com>
Date: Thu May 28 15:35:45 2015 -0700
NaCl: Fix lll_futex_timed_wait timeout calculation.
diff --git a/ChangeLog b/ChangeLog
index b68eab5..37dc47b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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]
diff --git a/sysdeps/nacl/lowlevellock-futex.h b/sysdeps/nacl/lowlevellock-futex.h
index 8d888a2..b614ac8 100644
--- a/sysdeps/nacl/lowlevellock-futex.h
+++ b/sysdeps/nacl/lowlevellock-futex.h
@@ -40,26 +40,26 @@
/* Wait until a lll_futex_wake call on FUTEXP, or TIMEOUT elapses. */
#define lll_futex_timed_wait(futexp, val, timeout, private) \
({ \
- /* This timeout is relative, but the IRT call wants it absolute. */ \
+ /* This timeout is relative, but the IRT call wants it absolute. */\
const struct timespec *_to = (timeout); \
struct timespec _ts; \
int _err = 0; \
if (_to != NULL \
- && __glibc_likely ((_err = __nacl_irt_clock.clock_gettime \
- (CLOCK_REALTIME, &_ts)) == 0)) \
+ && __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_nsec += 1000000000; \
- --_ts.tv_sec; \
- } \
- _to = &_ts; \
+ _ts.tv_sec += _to->tv_sec; \
+ _ts.tv_nsec += _to->tv_nsec; \
+ while (_ts.tv_nsec >= 1000000000) \
+ { \
+ _ts.tv_nsec -= 1000000000; \
+ ++_ts.tv_sec; \
+ } \
+ _to = &_ts; \
} \
if (_err == 0) \
_err = __nacl_irt_futex.futex_wait_abs \
- ((volatile int *) (futexp), val, _to); \
+ ((volatile int *) (futexp), val, _to); \
-_err; \
})
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
sysdeps/nacl/lowlevellock-futex.h | 24 ++++++++++++------------
2 files changed, 17 insertions(+), 12 deletions(-)
hooks/post-receive
--
GNU C Library master sources