From: "George Spelvin" <linux@horizon.com>
To: borntraeger@de.ibm.com, linux@horizon.com
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
paulmck@linux.vnet.ibm.com, torvalds@linux-foundation.org
Subject: Re: [PATCH 1/9] kernel: Provide READ_ONCE and ASSIGN_ONCE
Date: 5 Dec 2014 11:00:20 -0500 [thread overview]
Message-ID: <20141205160020.5785.qmail@ns.horizon.com> (raw)
In-Reply-To: <548178A2.9050409@de.ibm.com>
>> Minor style nit: is it necessary to name a non-pointer variable "p"?
>> I expect typeof(p) to be a pointer type.
> v might be better.
The current ACCESS_ONCE uses x. I also considered "var" and "mem".
>> (The other fun style question, which is a lot less minor, is whether
>> ASSIGN_ONCE should be (src,dst) as above, or (dst,src) like = and
>> <string.h>.)
> I tend to prefer dst, src, but Linus used src, dst in his proposal -
> so I used that.
The question is, does Linus actually care (hey, Linus, do you?), or was
that just a thoughtless part of a discussion about semantics?
Because if you prefer it too, there are arguments...
There are plenty of "store" operations with (src, dst) arguments,
because the focus is on the value being stored, so it comes first.
But the name "assign" almost always refers to the ":=" operation,
with the focus more on the destination.
(Now you have me thinking about German grammar and how the destination
can be identified by the dative "dem". But even though German depends
on word order less than English, normally the dative comes first.)
next prev parent reply other threads:[~2014-12-05 16:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-05 2:12 George Spelvin
2014-12-05 9:19 ` Christian Borntraeger
2014-12-05 16:00 ` George Spelvin [this message]
[not found] <CA+55aFzzEhbkoXnVGXAbq-HxejmWSyjMBN_aQM61J_zZLPXwAw@mail.gmail.com>
2014-12-05 21:38 ` George Spelvin
-- strict thread matches above, loose matches on Subject: below --
2014-12-03 22:30 [PATCHv4 0/9] ACCESS_ONCE and non-scalar accesses Christian Borntraeger
2014-12-03 22:30 ` [PATCH 1/9] kernel: Provide READ_ONCE and ASSIGN_ONCE Christian Borntraeger
2014-12-04 0:07 ` Paul E. McKenney
2014-12-04 9:24 ` Christian Borntraeger
2014-12-04 14:41 ` Paul E. McKenney
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=20141205160020.5785.qmail@ns.horizon.com \
--to=linux@horizon.com \
--cc=borntraeger@de.ibm.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=torvalds@linux-foundation.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
Powered by JetHome