lkml.org 
[lkml]   [2014]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 7/8] locking: Use [READ,ASSIGN]_ONCE() for non-scalar types
On Sun, Dec 28, 2014 at 01:11:22AM -0800, Davidlohr Bueso wrote:
> I guess everyone will eventually have to update, so lets
> do our part... and become the first users of ASSIGN_ONCE().

> - ACCESS_ONCE(prev->next) = node;
> + ASSIGN_ONCE(node, prev->next);

> - struct mcs_spinlock *next = ACCESS_ONCE(node->next);
> + struct mcs_spinlock *next = READ_ONCE(node->next);

That's disgusting and sad, doubly so because I was entirely unaware of that stuff.


\
 
 \ /
  Last update: 2014-12-28 18:01    [W:0.074 / U:0.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site