lkml.org 
[lkml]   [2015]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH tip/core/rcu 01/14] rcu: Protect rcu_boost() lockless accesses with ACCESS_ONCE()
On Fri, Jan 09, 2015 at 05:49:54AM -0800, Paul E. McKenney wrote:
> > That reminds me, I think the new conversion for stores will most likely
> > introduce silly arg bugs:
> >
> > - ACCESS_ONCE(a) = b;
> > + ASSIGN_ONCE(b, a);
>
> I was planning to do mine by hand for this sort of reason.
>
> Or are you thinking of something more subtle than the case where
> "b" is an unparenthesized comma-separated expression?

I think he's revering to the wrong way around-ness of the thing.

Its a bit of a mixed bag on assignments, but for instance
rcu_assign_pointer() takes them the right way around, as does
atomic_set().

So yes, I think the ASSIGN_ONCE() thing got the arguments the wrong way
around.

We could maybe still change it, before its in too long ?


\
 
 \ /
  Last update: 2015-01-09 15:01    [W:0.122 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site