From: Stephen Hemminger <stephen@networkplumber.org>
To: David VomLehn <vomlehn@texas.net>
Cc: netdev@vger.kernel.org,
Simon Edelhaus <Simon.Edelhaus@aquantia.com>,
Dmitrii Tarakanov <Dmitrii.Tarakanov@aquantia.com>,
Alexander Loktionov <Alexander.Loktionov@aquantia.com>
Subject: Re: [PATCH 02/12] Common functions and definitions
Date: Mon, 2 Jan 2017 12:00:31 -0800 [thread overview]
Message-ID: <20170102120031.32785d94@xeon-e3> (raw)
In-Reply-To: <67f8be9c3f6a4fede2eefaa4a3c45f9dbaf9b411.1482844668.git.vomlehn@texas.net>
> +#define AQ_OBJ_SET(_OBJ_, _F_) \
> +{ unsigned long flags_old, flags_new; atomic_t *flags = &(_OBJ_)->flags; \
> +do { \
> + flags_old = atomic_read(flags); \
> + flags_new = flags_old | (_F_); \
> +} while (atomic_cmpxchg(flags, \
> + flags_old, flags_new) != flags_old); }
> +
> +#define AQ_OBJ_CLR(_OBJ_, _F_) \
> +{ unsigned long flags_old, flags_new; atomic_t *flags = &(_OBJ_)->flags; \
> +do { \
> + flags_old = atomic_read(flags); \
> + flags_new = flags_old & ~(_F_); \
> +} while (atomic_cmpxchg(flags, \
> + flags_old, flags_new) != flags_old); }
> +
These are way to complex to be macros. Can't the same logic be done
as inline functions.
next prev parent reply other threads:[~2017-01-02 20:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-27 13:17 [PATCH 01/12] Make and configuration files David VomLehn
2016-12-27 13:17 ` [PATCH 02/12] Common functions and definitions David VomLehn
2016-12-27 13:17 ` [PATCH 03/12] Add ring spport code David VomLehn
2016-12-27 13:17 ` [PATCH 04/12] Low-level hardware interfaces David VomLehn
2016-12-27 13:17 ` [PATCH 05/12] Support for NIC-specific code David VomLehn
2016-12-27 13:17 ` [PATCH 06/12] Atlantic A0 specific functions David VomLehn
2016-12-27 13:17 ` [PATCH 07/12] Vector operations David VomLehn
2016-12-27 13:17 ` [PATCH 08/12] PCI operations David VomLehn
2016-12-27 13:17 ` [PATCH 09/12] Atlantic hardware abstraction layer David VomLehn
2016-12-27 13:17 ` [PATCH 10/12] Hardware interface and utility functions David VomLehn
2016-12-27 13:17 ` [PATCH 11/12] Ethtool support David VomLehn
2016-12-27 13:17 ` [PATCH 12/12] Receive side scaling David VomLehn
2016-12-28 5:21 ` [PATCH 05/12] Support for NIC-specific code Rami Rosen
2016-12-29 9:35 ` David VomLehn
2017-01-02 20:00 ` Stephen Hemminger [this message]
2016-12-27 16:15 ` [PATCH 01/12] Make and configuration files Joe Perches
2016-12-28 14:34 ` Joe Perches
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=20170102120031.32785d94@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=Alexander.Loktionov@aquantia.com \
--cc=Dmitrii.Tarakanov@aquantia.com \
--cc=Simon.Edelhaus@aquantia.com \
--cc=netdev@vger.kernel.org \
--cc=vomlehn@texas.net \
/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).