public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] libstdc++: Add missing return for atomic timed wait [PR102074]
@ 2021-08-31 16:49 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-08-31 16:49 UTC (permalink / raw)
  To: libstdc++, gcc-patches; +Cc: Thomas Rodgers

[-- Attachment #1: Type: text/plain, Size: 473 bytes --]

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.

Tested powerpc64le-linux and power-aix and sparc-solaris.

Committed to trunk.

We think there's another issue with return values for the futex case,
which we'll fix separately.


[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1046 bytes --]

commit 763eb1f19239ebb19c0f87590a4f02300c02c52b
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Aug 31 16:50:17 2021

    libstdc++: Add missing return for atomic timed wait [PR102074]
    
    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.

diff --git a/libstdc++-v3/include/bits/atomic_timed_wait.h b/libstdc++-v3/include/bits/atomic_timed_wait.h
index ec7ff51cdbc..3db08f82707 100644
--- a/libstdc++-v3/include/bits/atomic_timed_wait.h
+++ b/libstdc++-v3/include/bits/atomic_timed_wait.h
@@ -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
 	}
     };

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-31 16:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 16:49 [committed] libstdc++: Add missing return for atomic timed wait [PR102074] Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).