diff --git a/libstdc++-v3/include/bits/atomic_wait.h b/libstdc++-v3/include/bits/atomic_wait.h index cd756f68de6d..fdf7c4586f22 100644 --- a/libstdc++-v3/include/bits/atomic_wait.h +++ b/libstdc++-v3/include/bits/atomic_wait.h @@ -100,9 +100,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION auto __e = syscall (SYS_futex, static_cast(__addr), static_cast(__futex_wait_flags::__wait_private), __val, nullptr); - if (!__e) + if (!__e || EAGAIN) break; - else if (!(errno == EINTR || errno == EAGAIN)) + else if (errno != EINTR) __throw_system_error(__e); } } diff --git a/libstdc++-v3/testsuite/30_threads/latch/3.cc b/libstdc++-v3/testsuite/30_threads/latch/3.cc index 6304135a877c..70f2d183e87b 100644 --- a/libstdc++-v3/testsuite/30_threads/latch/3.cc +++ b/libstdc++-v3/testsuite/30_threads/latch/3.cc @@ -19,7 +19,6 @@ // { dg-do run { target c++2a } } // { dg-require-gthreads "" } // { dg-additional-options "-pthread" { target pthread } } -// { dg-skip-if "broken" { *-*-* } } #include #include diff --git a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_until.cc b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_until.cc index 5e1141425f72..58f68ce9e1ed 100644 --- a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_until.cc +++ b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_until.cc @@ -19,7 +19,6 @@ // { dg-do run { target c++2a } } // { dg-require-gthreads "" } // { dg-additional-options "-pthread" { target pthread } } -// { dg-skip-if "broken" { *-*-* } } #include #include