lkml.org 
[lkml]   [2013]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 RFC 1/3] documentation: Add needed ACCESS_ONCE() calls to memory-barriers.txt
On Thu, Nov 21, 2013 at 02:32:30PM -0800, Paul E. McKenney wrote:

> > > We could, but at the moment I would prefer the decrease in readability
> > > to the copy-and-paste bugs that omit needed ACCESS_ONCE() calls.
> > >
> > > Is there some way to get both ACCESS_ONCE() and readability? An
> > > abbreviation such as AO()? More easily distinguished variable names?
> > > Something else?
> >
> > Use a form that looks less like C and thus defeats copy/paste?
>
> My concern with that approach is that there is likely to be a large
> number of people who are likely to be willing and able to transcribe
> from any reasonable non-C form to ACCESS_ONCE()-free C code. :-/
>
> But maybe you have something specific in mind?

No, that was pretty much it. My issues is though that the subject matter
is difficult enough without actively obfuscating the examples.

Furthermore, people will find ways to get it wrong anyhow, if all they
do is copy/paste without thought, then getting it wrong is pretty much
guaranteed in this case. Memory ordering isn't something you can do
without thinking.




\
 
 \ /
  Last update: 2013-11-22 12:41    [W:0.056 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site