libstdc++/68921 add timeout argument to futex(2)

PR libstdc++/68921
	* src/c++11/futex.cc
	(__atomic_futex_unsigned_base::_M_futex_wait_until): Use null pointer
	as timeout argument.

From-SVN: r231679
This commit is contained in:
Jonathan Wakely 2015-12-16 11:48:55 +00:00 committed by Jonathan Wakely
parent 14415e109e
commit c6f35deb16
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2015-12-16 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/68921
* src/c++11/futex.cc
(__atomic_futex_unsigned_base::_M_futex_wait_until): Use null pointer
as timeout argument.
2015-12-15 Tim Shen <timshen@google.com>
Backport from mainline

View File

@ -52,7 +52,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// we will fall back to spin-waiting. The only thing we could do
// here on errors is abort.
int ret __attribute__((unused));
ret = syscall (SYS_futex, __addr, futex_wait_op, __val);
ret = syscall (SYS_futex, __addr, futex_wait_op, __val, nullptr);
_GLIBCXX_DEBUG_ASSERT(ret == 0 || errno == EINTR || errno == EAGAIN);
return true;
}