This patch fixes typos in file compiler-rt/lib/builtins/atomic.c.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
This leaves me wondering where the tests for this file are.
compiler-rt/lib/builtins/atomic.c | ||
---|---|---|
137 ↗ | (On Diff #190138) | Is IS_LOCK_FREE_1 omitted on purpose? |
142 ↗ | (On Diff #190138) | The LOCK_FREE_ACTION is not supposed to fall-through to here. I am not sure the change is helpful (and it may reduce the ability of compiler warnings to catch bad definitions of LOCK_FREE_ACTION). |
compiler-rt/lib/builtins/atomic.c | ||
---|---|---|
137 ↗ | (On Diff #190138) | __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. |
compiler-rt/lib/builtins/atomic.c | ||
---|---|---|
137 ↗ | (On Diff #190138) | I think there should be a case for 1 byte as well. Will add: case 1:\ if (IS_LOCK_FREE_1) {\ LOCK_FREE_ACTION(uint8_t);\ }\ break; \ |
142 ↗ | (On Diff #190138) | LOCK_FREE_ACTION is not supposed to fall-through. However, when IS_LOCK_FREE_* is false, the 'if' statement will fall-through. |