Re: [PATCH 2/4] atomics: update documentation for C11

2020-04-07 Thread Paolo Bonzini
On 07/04/20 11:06, Stefan Hajnoczi wrote: >> - >> -However, and this is the important difference between >> -atomic_mb_read/atomic_mb_set and sequential consistency, it is important >> -for both threads to access the same volatile variable. It is not the >> -case that everything visible to thread

Re: [PATCH 2/4] atomics: update documentation for C11

2020-04-07 Thread Stefan Hajnoczi
On Mon, Apr 06, 2020 at 03:13:18PM -0400, Paolo Bonzini wrote: > -The semantics of these primitives map to Java volatile variables, > -and are strongly related to memory barriers as used in the Linux > -kernel (see below). > - > -As long as you use atomic_mb_read and atomic_mb_set, accesses cannot

Re: [PATCH 2/4] atomics: update documentation for C11

2020-04-06 Thread Eric Blake
On 4/6/20 2:13 PM, Paolo Bonzini wrote: Deprecate atomic_mb_read and atomic_mb_set; it is not really possible to use them correctly because they do not interoperate with sequentially-consistent RMW operations. Signed-off-by: Paolo Bonzini --- docs/devel/atomics.rst | 290 -

[PATCH 2/4] atomics: update documentation for C11

2020-04-06 Thread Paolo Bonzini
Deprecate atomic_mb_read and atomic_mb_set; it is not really possible to use them correctly because they do not interoperate with sequentially-consistent RMW operations. Signed-off-by: Paolo Bonzini --- docs/devel/atomics.rst | 290 - 1 file changed, 114 i