[patch] fix libstdc++/59680
Jonathan Wakely
jwakely@redhat.com
Tue Mar 11 21:24:00 GMT 2014
On 9 January 2014 23:39, Jonathan Wakely wrote:
> PR libstdc++/59680
> * src/c++11/thread.cc (__sleep_for): Fix call to ::sleep.
>
> Tested x86_64-linux, and tested again with a hacked c++config.h to use
> ::sleep(), committed to trunk.
Also backported to the 4.8 branch now.
-------------- next part --------------
commit bdca0a1be8f2f59cba8ad3772c3b2f1d85aba0e8
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Mar 11 19:45:53 2014 +0000
2014-03-11 Jonathan Wakely <jwakely@redhat.com>
Backport from mainline.
2014-01-09 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/59680
* src/c++11/thread.cc (__sleep_for): Fix call to ::sleep.
diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc
index 8d040a7..0351f19 100644
--- a/libstdc++-v3/src/c++11/thread.cc
+++ b/libstdc++-v3/src/c++11/thread.cc
@@ -183,7 +183,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
::usleep(__us);
}
# else
- ::sleep(__s.count() + (__ns >= 1000000));
+ ::sleep(__s.count() + (__ns.count() >= 1000000));
# endif
#elif defined(_GLIBCXX_HAVE_WIN32_SLEEP)
unsigned long ms = __ns.count() / 1000000;
More information about the Gcc-patches
mailing list