+2015-03-18 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #18138]
+ * nptl/sem_waitcommon.c: Include <kernel-features.h>.
+ (futex_abstimed_wait)
+ [__ASSUME_FUTEX_CLOCK_REALTIME && lll_futex_timed_wait_bitset]:
+ Use lll_futex_timed_wait_bitset with FUTEX_CLOCK_REALTIME instead
+ of lll_futex_timed_wait.
+
2015-03-18 Brad Hubbard <bhubbard@redhat.com>
[BZ #17542]
17932, 17944, 17949, 17964, 17965, 17967, 17969, 17978, 17987, 17991,
17996, 17998, 17999, 18019, 18020, 18029, 18030, 18032, 18036, 18038,
18039, 18042, 18043, 18046, 18047, 18068, 18080, 18093, 18104, 18110,
- 18111, 18128.
+ 18111, 18128, 18138.
* Character encoding and ctype tables were updated to Unicode 7.0.0, using
new generator scripts contributed by Pravin Satpute and Mike FABIAN (Red
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <kernel-features.h>
#include <errno.h>
#include <sysdep.h>
#include <lowlevellock.h>
}
else
{
+#if (defined __ASSUME_FUTEX_CLOCK_REALTIME \
+ && defined lll_futex_timed_wait_bitset)
+ /* The Linux kernel returns EINVAL for this, but in userspace
+ such a value is valid. */
+ if (abstime->tv_sec < 0)
+ return ETIMEDOUT;
+#else
struct timeval tv;
struct timespec rt;
int sec, nsec;
/* Do wait. */
rt.tv_sec = sec;
rt.tv_nsec = nsec;
+#endif
if (cancel)
oldtype = __pthread_enable_asynccancel ();
+#if (defined __ASSUME_FUTEX_CLOCK_REALTIME \
+ && defined lll_futex_timed_wait_bitset)
+ err = lll_futex_timed_wait_bitset (futex, expected, abstime,
+ FUTEX_CLOCK_REALTIME, private);
+#else
err = lll_futex_timed_wait (futex, expected, &rt, private);
+#endif
if (cancel)
__pthread_disable_asynccancel (oldtype);
}