[PATCH] D59228: Fix typos in compiler-rt/lib/builtins/atomic.c
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 13 08:44:17 PDT 2019
hubert.reinterpretcast added inline comments.
================
Comment at: compiler-rt/lib/builtins/atomic.c:137
do {\
switch (size) {\
case 2:\
----------------
hubert.reinterpretcast wrote:
> Is `IS_LOCK_FREE_1` omitted on purpose?
`__atomic_compare_exchange_c` is lockful for 1-byte size regardless of platform support. A use of `__atomic_store_1` is potentially lock-free depending on platform support. It is therefore possible for an `__atomic_store_1` to violate the locking performed by `__atomic_compare_exchange_c`. This can potentially manifest as the `__atomic_store_1` being never observed by the thread performing `__atomic_compare_exchange_c`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59228/new/
https://reviews.llvm.org/D59228
More information about the llvm-commits
mailing list