lkml.org 
[lkml]   [2020]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tools/memory-model: document the "one-time init" pattern
On Thu, Jul 16, 2020 at 09:44:27PM -0700, Eric Biggers wrote:

...
> +Note that when the cmpxchg_release() fails due to another task already
> +having done it, a second smp_load_acquire() is required, since we still
> +need to acquire the data that the other task released.

When people talk about releasing data, they usually mean something
different from what you mean here (i.e., they usually mean
deallocating). Likewise, acquiring data (to the extent that it means
anything) would generally be regarded as meaning a simple read. I
recommend changing the last phrase above to:

... since we still need a load-acquire of the data on which
the other task performed a store-release.

Alan Stern

\
 
 \ /
  Last update: 2020-07-17 16:26    [W:0.243 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site