Revert "threading_support: make __thread_sleep_for be alertable"

This reverts SVN r295329.  Although `__libcpp_thread_sleep_for` should
be alertable, the implementation causes a large regression in the test
suite.  Add a FIXME item there for now to get the test suite in a better
state before attempting to fix that behaviour.

llvm-svn: 295561
This commit is contained in:
Saleem Abdulrasool 2017-02-18 19:28:43 +00:00
parent c409aa8a9e
commit b455a8331c
1 changed files with 3 additions and 5 deletions

View File

@ -589,14 +589,12 @@ void __libcpp_thread_yield()
void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns)
{
using namespace _VSTD::chrono;
using namespace chrono;
// round-up to the nearest milisecond
milliseconds __ms =
duration_cast<milliseconds>(__ns + chrono::nanoseconds(999999));
auto start = system_clock::now();
while (::SleepEx((__ms - (system_clock::now() - start)).count(),
TRUE) == WAIT_IO_COMPLETION);
// FIXME(compnerd) this should be an alertable sleep (WFSO or SleepEx)
Sleep(__ms.count());
}
// Thread Local Storage