lkml.org 
[lkml]   [2018]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire
> >   ACQUIRE operations include LOCK operations and both smp_load_acquire()
> > and smp_cond_acquire() operations. [BTW, the latter was replaced by
> > smp_cond_load_acquire() in 1f03e8d2919270 ...]
> >
> > RELEASE operations include UNLOCK operations and smp_store_release()
> > operations. [...]
> >
> > [...] after an ACQUIRE on a given variable, all memory accesses
> > preceding any prior RELEASE on that same variable are guaranteed
> > to be visible.
>
> As far as I can see, these statements remain valid.

Interesting; ;-) What does these statement tells you ;-) when applied
to a: and b: below?

a: WRITE_ONCE(x, 1); // "preceding any prior RELEASE..."
smp_store_release(&s, 1);
smp_load_acquire(&s);
b: WRITE_ONCE(y, 1); // "after an ACQUIRE..."

Andrea

\
 
 \ /
  Last update: 2018-07-10 17:25    [W:0.163 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site