Message ID | YVNuivmdn6tWFc1b@redhat.com |
---|---|
State | New |
Headers | show |
Series | libstdc++: Fix return values for atomic wait on futex | expand |
diff --git a/libstdc++-v3/include/bits/atomic_timed_wait.h b/libstdc++-v3/include/bits/atomic_timed_wait.h index 3db08f82707..d423a7af7c3 100644 --- a/libstdc++-v3/include/bits/atomic_timed_wait.h +++ b/libstdc++-v3/include/bits/atomic_timed_wait.h @@ -101,12 +101,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__e) { - if ((errno != ETIMEDOUT) && (errno != EINTR) - && (errno != EAGAIN)) + if (errno == ETIMEDOUT) + return false; + if (errno != EINTR && errno != EAGAIN) __throw_system_error(errno); - return true; } - return false; + return true; } // returns true if wait ended before timeout