]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Add missing return for atomic timed wait [PR102074]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 31 Aug 2021 15:50:17 +0000 (16:50 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 31 Aug 2021 16:36:12 +0000 (17:36 +0100)
This adds a missing return statement to the non-futex wait-until
operation.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/102074
* include/bits/atomic_timed_wait.h (__timed_waiter_pool)
[!_GLIBCXX_HAVE_PLATFORM_TIMED_WAIT]: Add missing return.

libstdc++-v3/include/bits/atomic_timed_wait.h

index ec7ff51cdbc6ef33db6968a591d7993cbdcc213a..3db08f827079170e057d7261abdd582163004d13 100644 (file)
@@ -213,6 +213,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
              lock_guard<mutex> __l(_M_mtx);
              return __cond_wait_until(_M_cv, _M_mtx, __atime);
            }
+         else
+           return true;
 #endif // _GLIBCXX_HAVE_PLATFORM_TIMED_WAIT
        }
     };