public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Rodgers <trodgers@redhat.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: "libstdc++" <libstdc++@gcc.gnu.org>,
	gcc Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] libstdc++: Add missing free functions for atomic_flag [PR103934]
Date: Mon, 13 Feb 2023 18:06:11 -0800	[thread overview]
Message-ID: <CAMmuTO_sqTJTw_08drRVtyFjT+TknW0mdjv2ZHF4JoMxKiu-YA@mail.gmail.com> (raw)
In-Reply-To: <CACb0b4=q3WjNa9vhKozQiWxkyLDPy+z20+5h+KpFzjT085Yo8Q@mail.gmail.com>

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

Tested x86_64-pc-linux-gnu. Pushed to trunk.

The first patch has also been backported and pushed to releases/gcc-12 and
releases/gcc-11

The second patch fails to cleanly cherry-pick. Will resolve and push
shortly.

On Fri, Feb 10, 2023 at 4:41 PM Jonathan Wakely <jwakely@redhat.com> wrote:

> On Fri, 10 Feb 2023 at 18:25, Thomas Rodgers <trodgers@redhat.com> wrote:
> >
> > This patch did not get committed in a timely manner after it was OK'd.
> In revisiting the patch some issues were found that have lead me to
> resubmit for review -
> >
> > Specifically -
> >
> > The original commit to add C++20 atomic_flag::test did not include the
> free functions for atomic_flag_test[_explicit]
> > The original commit to add C++20 atomic_flag::wait/notify did not
> include the free functions for atomic_flag_wait/notify[_explicit]
> >
> > These two commits landed in GCC10 and GCC11 respectively. My original
> patch included both sets of free functions, but
> > that complicates the backporting of these changes to GCC10, GCC11, and
> GCC12.
>
> I don't think we need them in GCC 10.
>
> > Additionally commit 7c2155 removed const qualification from
> atomic_flag::notify_one/notify_all but the original version of this
> > patch accepts the atomic flag as const.
> >
> > The original version of this patch did not include test cases for the
> atomic_flag_test[_explicit] free functions.
> >
> > I have split the original patch into two patches, on for the
> atomic_flag_test free functions, and one for the atomic_flag_wait/notify
> > free functions.
>
> Thanks.
>
> For [PATCH 1/2] please name the added functions in the changelog entry:
>
> * include/std/atomic (atomic_flag_test): Add.
> (atomic_flag_test_explicit): Add.
>
> Similarly for the changelog in [PATCH 2/2], naming the four new
> functions added to include/std/atomic.
>
> The indentation is off in [PATCH 2/2] for atomic_flag:
>
> +#if __cpp_lib_atomic_wait
> +  inline void
> +      atomic_flag_wait(atomic_flag* __a, bool __old) noexcept
> +  { __a->wait(__old); }
> +
>
> And similarly for the other three added functions.
> The function names should start in the same column as the 'inline' and
> opening brace of the function body.
>
>
> Both patches are OK for trunk, gcc-12 and gcc-11 with those changes.
>
>
>
>
> >
> >
> > On Wed, Feb 2, 2022 at 1:35 PM Jonathan Wakely <jwakely@redhat.com>
> wrote:
> >>
> >> >+  inline void
> >> >+  atomic_flag_wait_explicit(const atomic_flag* __a, bool __old,
> >> >+               std::memory_order __m) noexcept
> >>
> >> No need for the std:: qualification, and check the indentation.
> >>
> >>
> >> > libstdc++-v3/ChangeLog:
> >> >
> >> >    PR103934
> >>
> >> This needs to include the component: PR libstdc++/103934
> >>
> >> >    * include/std/atomic: Add missing free functions.
> >>
> >> Please name the new functions in the changelog, in the usual format.
> >> Just the names is fine, no need for the full signatures with
> >> parameters.
> >>
> >> OK for trunk with those changes.
> >>
>
>

  reply	other threads:[~2023-02-14  2:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-15  2:53 Thomas Rodgers
2022-02-02 21:35 ` Jonathan Wakely
2023-02-10 18:25   ` Thomas Rodgers
2023-02-11  0:41     ` Jonathan Wakely
2023-02-14  2:06       ` Thomas Rodgers [this message]
2023-03-10  2:39         ` 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=CAMmuTO_sqTJTw_08drRVtyFjT+TknW0mdjv2ZHF4JoMxKiu-YA@mail.gmail.com \
    --to=trodgers@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --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).