[Bug libstdc++/52680] std::this_thread::sleep_for #ifdef'd out by _GLIBCXX_USE_NANOSLEEP

2012-11-23 Thread redi at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52680



--- Comment #11 from Jonathan Wakely redi at gcc dot gnu.org 2012-11-23 
22:11:30 UTC ---

Author: redi

Date: Fri Nov 23 22:11:23 2012

New Revision: 193769



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=193769

Log:

PR libstdc++/52680

* acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Check for usleep and

sleep if nanosleep is not available. Bump libtool revision.

* config.h.in: Regenerate.

* configure: Likewise.

* config/abi/pre/gnu.ver (GLIBCXX_3.4.18): Add __sleep_for.

* include/std/thread (this_thread::__sleep_for): Add.

(this_thread::yield, this_thread::sleep_until, this_thread::sleep_for):

Declare unconditionally.

* src/c++11/thread.cc (this_thread::__sleep_for): Define.

* testsuite/lib/libstdc++.exp (check_v3_target_nanosleep): Rename to

check_v3_target_sleep.

* testsuite/lib/dg-options.exp (dg-require-nanosleep): Rename to

dg-require-sleep.

* testsuite/30_threads/condition_variable_any/53830.cc: Update.

* testsuite/30_threads/this_thread/2.cc: Likewise.

* testsuite/30_threads/this_thread/3.cc: Likewise.

* testsuite/30_threads/this_thread/4.cc: Likewise.

* testsuite/30_threads/async/54297.cc: Likewise.



Modified:

trunk/libstdc++-v3/ChangeLog

trunk/libstdc++-v3/acinclude.m4

trunk/libstdc++-v3/config.h.in

trunk/libstdc++-v3/config/abi/pre/gnu.ver

trunk/libstdc++-v3/configure

trunk/libstdc++-v3/include/std/thread

trunk/libstdc++-v3/src/c++11/thread.cc

trunk/libstdc++-v3/testsuite/30_threads/async/54297.cc

trunk/libstdc++-v3/testsuite/30_threads/condition_variable_any/53830.cc

trunk/libstdc++-v3/testsuite/30_threads/this_thread/2.cc

trunk/libstdc++-v3/testsuite/30_threads/this_thread/3.cc

trunk/libstdc++-v3/testsuite/30_threads/this_thread/4.cc

trunk/libstdc++-v3/testsuite/lib/dg-options.exp

trunk/libstdc++-v3/testsuite/lib/libstdc++.exp


[Bug libstdc++/52680] std::this_thread::sleep_for #ifdef'd out by _GLIBCXX_USE_NANOSLEEP

2012-11-23 Thread redi at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52680



Jonathan Wakely redi at gcc dot gnu.org changed:



   What|Removed |Added



 Status|NEW |RESOLVED

 Resolution||FIXED

   Target Milestone|--- |4.8.0



--- Comment #12 from Jonathan Wakely redi at gcc dot gnu.org 2012-11-23 
22:31:14 UTC ---

fixed for 4.8, this_thread::sleep_for is always defined


[Bug libstdc++/52680] std::this_thread::sleep_for #ifdef'd out by _GLIBCXX_USE_NANOSLEEP

2012-06-05 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52680

--- Comment #10 from Jonathan Wakely redi at gcc dot gnu.org 2012-06-05 
18:15:28 UTC ---
some ideas at http://gcc.gnu.org/ml/libstdc++/2012-05/msg00085.html


[Bug libstdc++/52680] std::this_thread::sleep_for #ifdef'd out by _GLIBCXX_USE_NANOSLEEP

2012-04-17 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52680

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

  Component|c++ |libstdc++

--- Comment #8 from Paolo Carlini paolo.carlini at oracle dot com 2012-04-17 
09:43:26 UTC ---
This is a library issue isn't it?


[Bug libstdc++/52680] std::this_thread::sleep_for #ifdef'd out by _GLIBCXX_USE_NANOSLEEP

2012-04-17 Thread mkline at cs dot wisc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52680

--- Comment #9 from Matt Kline mkline at cs dot wisc.edu 2012-04-17 16:35:51 
UTC ---
Yes it is. Sorry for misclassifying it.