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: r231676
This commit is contained in:
Jonathan Wakely 2015-12-16 10:40:04 +00:00 committed by Jonathan Wakely
parent 1408479363
commit 55089c2b5c
2 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,10 @@
2015-12-15 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.
* include/std/functional (_Mu<_Arg, false, false>::operator()): Restore
accidentally-removed volatile qualifier.

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;
}