aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely.gcc@gmail.com>2011-05-27 21:37:53 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2011-05-27 22:37:53 +0100
commitd112944143e99e9a99a78b43cdd60dc940c0209f (patch)
treed6417d1e120ccccce1d8557fff63c1c4c375df8f
parent5aacb11e06658a9d38b9810db0d9587c64271122 (diff)
downloadgcc-d112944143e99e9a99a78b43cdd60dc940c0209f.zip
gcc-d112944143e99e9a99a78b43cdd60dc940c0209f.tar.gz
gcc-d112944143e99e9a99a78b43cdd60dc940c0209f.tar.bz2
thread (this_thread::sleep_until): Move after sleep_for.
2011-05-27 Jonathan Wakely <jwakely.gcc@gmail.com> * include/std/thread (this_thread::sleep_until): Move after sleep_for. From-SVN: r174365
-rw-r--r--libstdc++-v3/ChangeLog4
-rw-r--r--libstdc++-v3/include/std/thread12
2 files changed, 10 insertions, 6 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 5be06f5..e5915c1 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,7 @@
+2011-05-27 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/std/thread (this_thread::sleep_until): Move after sleep_for.
+
2011-05-27 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/49187
diff --git a/libstdc++-v3/include/std/thread b/libstdc++-v3/include/std/thread
index 4fa5e50..e7a9b14 100644
--- a/libstdc++-v3/include/std/thread
+++ b/libstdc++-v3/include/std/thread
@@ -260,12 +260,6 @@ _GLIBCXX_END_NAMESPACE_VERSION
#endif
#ifdef _GLIBCXX_USE_NANOSLEEP
- /// sleep_until
- template<typename _Clock, typename _Duration>
- inline void
- sleep_until(const chrono::time_point<_Clock, _Duration>& __atime)
- { sleep_for(__atime - _Clock::now()); }
-
/// sleep_for
template<typename _Rep, typename _Period>
inline void
@@ -285,6 +279,12 @@ _GLIBCXX_END_NAMESPACE_VERSION
::nanosleep(&__ts, 0);
}
+
+ /// sleep_until
+ template<typename _Clock, typename _Duration>
+ inline void
+ sleep_until(const chrono::time_point<_Clock, _Duration>& __atime)
+ { sleep_for(__atime - _Clock::now()); }
#endif
_GLIBCXX_END_NAMESPACE_VERSION