lkml.org 
[lkml]   [2013]   [Nov]   [21]   [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 01:31:27PM -0800, Paul E. McKenney wrote:
> From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
>
> The Documentation/memory-barriers.txt file was written before the need
> for ACCESS_ONCE() was fully appreciated. It therefore contains no
> ACCESS_ONCE() calls, which can be a problem when people lift examples
> from it. This commit therefore adds ACCESS_ONCE() calls.

So I find the repeated ACCESS_ONCE() significantly detracts from the
readability of the text.

Can't we simply state that all accesses are assumed single-copy atomic
and this can be achieved for naturally aligned words using ACCESS_ONCE()
in C/C++ ?


\
 
 \ /
  Last update: 2013-11-21 23:21    [W:0.078 / U:2.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site