gcc/libstdc++-v3
Jonathan Wakely cfef4c324a PR libstdc++/80538 Only call sleep for non-zero values
Avoid a system call when no sleep is required. Sleep in a loop (actually
two loops) to handle interruption by signals.

	PR libstdc++/80538
	* src/c++11/thread.cc (this_thread::__sleep_for)
	[_GLIBCXX_HAVE_SLEEP]: Only call sleep for non-zero values.
	Loop while sleep call is interrupted and until steady_clock
	shows requested duration has elapsed.
	(!_GLIBCXX_HAVE_USLEEP]: Use the _GLIBCXX_HAVE_SLEEP code path, but
	avoiding the usleep call.
	* testsuite/30_threads/this_thread/60421.cc: Test repeated
	signal interruptions.

From-SVN: r265044
2018-10-11 17:37:23 +01:00
..
config config: Remove unused define for os uClibc 2018-10-02 14:35:42 +02:00
doc allocator.xml: Adjust link to "Reconsidering Custom Memory Allocation". 2018-10-01 15:17:15 +00:00
include Make ext allocators support heterogeneous equality comparison 2018-10-11 12:32:29 +01:00
libsupc++ * libsupc++/cxxabi.h (__cxa_demangle): Clarify doxygen comment. 2018-09-05 16:18:16 +01:00
po
python Define std::string and related typedefs outside __cxx11 namespace 2018-10-09 14:06:46 +01:00
scripts Fix comments in testsuite script 2018-08-23 16:10:35 +01:00
src PR libstdc++/80538 Only call sleep for non-zero values 2018-10-11 17:37:23 +01:00
testsuite PR libstdc++/80538 Only call sleep for non-zero values 2018-10-11 17:37:23 +01:00
acinclude.m4
aclocal.m4
ChangeLog PR libstdc++/80538 Only call sleep for non-zero values 2018-10-11 17:37:23 +01:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
config.h.in
configure Revert "libstdc++-v3: Have aligned_alloc() on Newlib" 2018-08-13 19:54:21 +01:00
configure.ac Revert "libstdc++-v3: Have aligned_alloc() on Newlib" 2018-08-13 19:54:21 +01:00
configure.host Don't force visibility to hidden for Darwin > 8. 2018-08-25 09:02:28 +00:00
crossconfig.m4
fragment.am
linkage.m4
Makefile.am
Makefile.in
README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.