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
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
async | Loading commit data... | |
call_once | Loading commit data... | |
condition_variable | Loading commit data... | |
condition_variable_any | Loading commit data... | |
future | Loading commit data... | |
headers | Loading commit data... | |
lock | Loading commit data... | |
lock_guard | Loading commit data... | |
mutex | Loading commit data... | |
once_flag/cons | Loading commit data... | |
packaged_task | Loading commit data... | |
promise | Loading commit data... | |
recursive_mutex | Loading commit data... | |
recursive_timed_mutex | Loading commit data... | |
scoped_lock | Loading commit data... | |
shared_future | Loading commit data... | |
shared_lock | Loading commit data... | |
shared_mutex | Loading commit data... | |
shared_timed_mutex | Loading commit data... | |
this_thread | Loading commit data... | |
thread | Loading commit data... | |
timed_mutex | Loading commit data... | |
try_lock | Loading commit data... | |
unique_lock | Loading commit data... |