public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Rodgers <trodgers@redhat.com>
To: "libstdc++" <libstdc++@gcc.gnu.org>,
	gcc Patches <gcc-patches@gcc.gnu.org>
Subject: libstdc++: Make atomic<T*>::wait() const [PR102994]
Date: Fri, 5 Nov 2021 14:44:43 -0700	[thread overview]
Message-ID: <CAMmuTO9Z4rMGN0rhG=PHisSwPzonaggj68te1odk5O5TPEL4+A@mail.gmail.com> (raw)

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



[-- Attachment #2: 0001-libstdc-Make-atomic-T-wait-const-PR102994.patch --]
[-- Type: text/x-patch, Size: 1109 bytes --]

From 360c094a0725bb0cc444115c0377db10e5e9ae1f Mon Sep 17 00:00:00 2001
From: Thomas Rodgers <rodgert@twrodgers.com>
Date: Fri, 5 Nov 2021 14:30:24 -0700
Subject: [PATCH] libstdc++: Make atomic<T*>::wait() const [PR102994]

This was an oversight in the original commit adding wait/notify
to atomic<T>.

libstdc++-v3/ChangeLog:

	PR libstdc++/102994
	* include/bits/atomic_base.h (__atomic_base<_PTp*>::wait())
	add const qualifier.
---
 libstdc++-v3/include/bits/atomic_base.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h
index 9e18aadadaf..a104adc1a10 100644
--- a/libstdc++-v3/include/bits/atomic_base.h
+++ b/libstdc++-v3/include/bits/atomic_base.h
@@ -893,7 +893,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #if __cpp_lib_atomic_wait
       _GLIBCXX_ALWAYS_INLINE void
       wait(__pointer_type __old,
-	   memory_order __m = memory_order_seq_cst) noexcept
+	   memory_order __m = memory_order_seq_cst) const noexcept
       {
 	std::__atomic_wait_address_v(&_M_p, __old,
 				     [__m, this]
-- 
2.31.1


             reply	other threads:[~2021-11-05 21:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05 21:44 Thomas Rodgers [this message]
2021-11-05 21:48 ` Jonathan Wakely
2021-11-05 23:46   ` Jonathan Wakely
2021-11-09 18:09     ` Thomas Rodgers
2021-11-09 19:40       ` Jonathan Wakely
2021-11-24  1:27         ` Thomas Rodgers
2021-11-25 21:24           ` Jonathan Wakely
2021-12-10  2:14             ` Thomas Rodgers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMmuTO9Z4rMGN0rhG=PHisSwPzonaggj68te1odk5O5TPEL4+A@mail.gmail.com' \
    --to=trodgers@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).