[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/4] atomics: update documentation for C11
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH 2/4] atomics: update documentation for C11 |
Date: |
Tue, 7 Apr 2020 11:13:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
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 A when it writes volatile field f
>> -becomes visible to thread B after it reads volatile field g. The store
>> -and load have to "match" (i.e., be performed on the same volatile
>> -field) to achieve the right semantics.
>> -
>> -
>> -These operations operate on any type that is as wide as an int or smaller.
>> +which however are deprecated.
> Please indicate why they are deprecated and advise which alternative is
> preferred. This will help readers understand the current best practices
> and make a decision about whether to avoid the deprecated APIs.
True, I will put a link to the "Comparison with Linux" section and clarify.
Paolo
signature.asc
Description: OpenPGP digital signature
- [RFC PATCH 0/4] async: fix hangs on weakly-ordered architectures, Paolo Bonzini, 2020/04/06
- [PATCH 3/4] rcu: do not mention atomic_mb_read/set in documentation, Paolo Bonzini, 2020/04/06
- [PATCH 4/4] async: use explicit memory barriers and relaxed accesses, Paolo Bonzini, 2020/04/06
- [PATCH 2/4] atomics: update documentation for C11, Paolo Bonzini, 2020/04/06
- [PATCH 1/4] atomics: convert to reStructuredText, Paolo Bonzini, 2020/04/06
- Re: [RFC PATCH 0/4] async: fix hangs on weakly-ordered architectures, Stefan Hajnoczi, 2020/04/07