DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Eli Britstein <elibr@nvidia.com>
Cc: dev@dpdk.org, david.marchand@redhat.com
Subject: Re: [dpdk-dev] [PATCH] eal: fix build with conflicting libc variable memory_order
Date: Thu, 15 Oct 2020 01:16:29 +0200
Message-ID: <1634944.yJlA45dGKM@thomas> (raw)
In-Reply-To: <20201014061909.9957-1-elibr@nvidia.com>

14/10/2020 08:19, Eli Britstein:
> The cited commit introduced functions with 'int memory_order' argument.
> The C11 standard section 7.17.1.4 defines 'memory_order' as the
> "enumerated type whose enumerators identify memory ordering constraints".
> Applications that use the standard enum (includes stdatomic.h), will
> fail compilation with:
> error: declaration of 'memory_order' shadows a global declaration
>     [-Werror=shadow]
>      rte_atomic_thread_fence(int memory_order)
> Fix it by changing the argument name 'memory_order' to 'memorder'.

Not clear why it builds fine with most compilers,
but the fix does not hurt.

> Fixes: 672a15056380 ("eal: add wrapper for C11 atomic thread fence")

A blank line should be inserted here.

> Signed-off-by: Eli Britstein <elibr@nvidia.com>

Acked-by: Thomas Monjalon <thomas@monjalon.net>



  parent reply	other threads:[~2020-10-14 23:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14  6:19 Eli Britstein
2020-10-14 13:34 ` Asaf Penso
2020-10-14 23:16 ` Thomas Monjalon [this message]
2020-10-15  7:12   ` David Marchand

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=1634944.yJlA45dGKM@thomas \
    --to=thomas@monjalon.net \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=elibr@nvidia.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git