DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
Cc: "Mattias Rönnblom" <hofors@lysator.liu.se>,
	"Morten Brørup" <mb@smartsharesystems.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Tyler Retzlaff" <roretzla@microsoft.com>,
	"konstantin.v.ananyev@yandex.ru" <konstantin.v.ananyev@yandex.ru>,
	nd <nd@arm.com>,
	"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
Subject: Re: rte_atomic_*_explicit
Date: Fri, 26 Jan 2024 13:03:12 -0800	[thread overview]
Message-ID: <20240126210312.GA22822@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> (raw)
In-Reply-To: <AM8PR08MB5810B78888DCBC1F80543C5398792@AM8PR08MB5810.eurprd08.prod.outlook.com>

On Fri, Jan 26, 2024 at 04:58:54PM +0000, Honnappa Nagarahalli wrote:
> <snip>
> 
> > >
> > >>
> > >> On Thu, Jan 25, 2024 at 11:10:47PM +0100, Morten Br�rup wrote:
> > >>>> From: Mattias R�nnblom [mailto:hofors@lysator.liu.se]
> > >>>> Sent: Thursday, 25 January 2024 19.54
> > >>>>
> > >>>> Why do rte_stdatomic.h functions have the suffix "_explicit"?
> > >>>> Especially
> > >>>> since there aren't any wrappers for the implicit variants.
> > >>>>
> > >>>> More to type, more to read.
> > >>>
> > >>> They have the "_explicit" suffix to make their names similar to
> > >>> those in
> > >> stdatomic.h.
> > >>>
> > >>> You might consider their existence somewhat temporary until C11
> > >>> stdatomics
> > >> can be fully phased in, so there's another argument for similar
> > >> names. (This probably does not happen as long as compilers generate
> > >> slower code for C11 stdatomics than with their atomic built-ins.)
> > >>
> > >> yes, there was feedback at the time it was.
> > >>
> > >> * we should *not* have non-explicit versions of the macros
> > >> * the atomic generic functions should be named to match C11 standard
> > >>    with a rte_ prefix.
> > > This was mainly done to ensure that users think through the memory
> > ordering they want to use. This also matches with the compiler atomic built-
> > ins. Without explicit, it is sequentially consistent memory order.
> > >
> > 
> > "This" is referring to the first bullet only, correct?
> > 
> > You don't have to distinguish between implicit and explicit if you only have
> > explicit.
> Agree on your thought.
> 
> The '_explicit' was added to be aligned with the standard atomic API naming. The thought was - if we are aligned on the names, it needs less explanation for users.

well another benefit is that in the future if/when a decision is made to
directly use the names from the standard it is most trivial to just
strip the rte_ prefix tree wide.

  reply	other threads:[~2024-01-26 21:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-25 18:53 rte_atomic_*_explicit Mattias Rönnblom
2024-01-25 22:10 ` rte_atomic_*_explicit Morten Brørup
2024-01-25 22:34   ` rte_atomic_*_explicit Tyler Retzlaff
2024-01-26  1:37     ` rte_atomic_*_explicit Honnappa Nagarahalli
2024-01-26  8:12       ` rte_atomic_*_explicit Mattias Rönnblom
2024-01-26 16:58         ` rte_atomic_*_explicit Honnappa Nagarahalli
2024-01-26 21:03           ` Tyler Retzlaff [this message]
2024-01-26  8:07   ` rte_atomic_*_explicit Mattias Rönnblom
2024-01-26 10:52     ` rte_atomic_*_explicit Morten Brørup
2024-01-26 21:35       ` rte_atomic_*_explicit Tyler Retzlaff
2024-01-27 20:34         ` rte_atomic_*_explicit Mattias Rönnblom
2024-01-30 18:36           ` rte_atomic_*_explicit Tyler Retzlaff
2024-01-31 15:52             ` rte_atomic_*_explicit Mattias Rönnblom
2024-01-31 17:34               ` rte_atomic_*_explicit Morten Brørup
2024-01-27 19:08       ` rte_atomic_*_explicit Mattias Rönnblom

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=20240126210312.GA22822@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net \
    --to=roretzla@linux.microsoft.com \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=dev@dpdk.org \
    --cc=hofors@lysator.liu.se \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=mattias.ronnblom@ericsson.com \
    --cc=mb@smartsharesystems.com \
    --cc=nd@arm.com \
    --cc=roretzla@microsoft.com \
    /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 NNTP newsgroup(s).