aboutsummaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
authorAndrew Paprocki <andrew@ishiboo.com>2019-09-06 10:17:11 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2019-09-06 10:17:12 +0200
commit4a972bf0e52064e341960691d0b27bd58bfaacfa (patch)
treeabf2219114a1e9cbc547e4c81e13b5d244252958 /docs/src
parent1f1f1126b3a7d1b329ea1b658cad21a59289103b (diff)
downloadlibuv-4a972bf0e52064e341960691d0b27bd58bfaacfa.tar.gz
libuv-4a972bf0e52064e341960691d0b27bd58bfaacfa.zip
aix: Fix broken cmpxchgi() XL C++ specialization.
The preprocessor was used to select a special implementation when building on AIX using XL C++ (strangely, not XL C). This code implemented `cmpxchgi()` by directly reading the old value and then calling `__compare_and_swap()`, an intrinsic that does not provide any sort of memory barrier guarantees. The return value was not used, and the value read prior to the `__compare_and_swap()` call was returned. There is no way that this code could provide the required semantics of the function and it causes observable data races and strange library failures in production under load. XL C/C++ for AIX has provided support for the GCC intrinsic used in the GCC/Clang cases since version 12.1 of the compiler. This version of the compiler is old enough that it doesn't warrant a version check. (The compiler was released 8-Jun-2012, maintenance ended 9-Jul-2019, and service ends 30-Apr-2020.) This change fixes all observed atomic issues and unifies XL C/C++ with GCC/Clang. Relevant XL C/C++ for AIX V12.1 documentation links: - [__compare_and_swap](https://www.ibm.com/support/knowledgecenter/en/SSGH3R_12.1.0/com.ibm.xlcpp121.aix.doc/compiler_ref/bif_compare_and_swap_compare_and_swaplp.html) - [__sync_val_compare_and_swap](https://www.ibm.com/support/knowledgecenter/en/SSGH3R_12.1.0/com.ibm.xlcpp121.aix.doc/compiler_ref/bif_gcc_atomic_val_comp_swap.html) PR-URL: https://github.com/libuv/libuv/pull/2455 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'docs/src')
0 files changed, 0 insertions, 0 deletions