diff mbox

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

Message ID 20151215184651.GO5356@redhat.com
State New
Headers show

Commit Message

Jonathan Wakely Dec. 15, 2015, 6:46 p.m. UTC
This fixes a missing argument to the futex syscall.

Tested powerpc64le-linux. This needs to be fixed for gcc-5 and trunk.

Comments

Torvald Riegel Dec. 15, 2015, 8:08 p.m. UTC | #1
On Tue, 2015-12-15 at 18:46 +0000, Jonathan Wakely wrote:
> This fixes a missing argument to the futex syscall.
> 
> Tested powerpc64le-linux. This needs to be fixed for gcc-5 and trunk.
> 

OK.  Thanks!
diff mbox

Patch

commit ea5726fb770a1e89f6102c903f828ec6d71a1e3d
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Dec 15 18:34:52 2015 +0000

    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.

diff --git a/libstdc++-v3/src/c++11/futex.cc b/libstdc++-v3/src/c++11/futex.cc
index e04dba8..e723364 100644
--- a/libstdc++-v3/src/c++11/futex.cc
+++ b/libstdc++-v3/src/c++11/futex.cc
@@ -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;
       }