diff options
| author | Soumya AR <soumyaa@nvidia.com> | 2026-01-16 05:20:50 +0000 |
|---|---|---|
| committer | Soumya AR <soumyaa@nvidia.com> | 2026-01-28 10:57:37 +0530 |
| commit | 68a1218c189cce1eea2f3b035848984aa2ee8a5b (patch) | |
| tree | b3bd430d194206fa28af022ff15cf0d072eb609c /libjava/gnu/java | |
| parent | 6e9cf03a7602055b534a0bb1f0219d9d35104c2e (diff) | |
| download | gcc-68a1218c189cce1eea2f3b035848984aa2ee8a5b.zip gcc-68a1218c189cce1eea2f3b035848984aa2ee8a5b.tar.gz gcc-68a1218c189cce1eea2f3b035848984aa2ee8a5b.tar.bz2 | |
libstdc++: Implement std::atomic::fetch_min/max
This patch extends libstdc++ to implement C++26's atomic fetch min/max
operations.
The __atomic_fetch_minmaxable concept checks if __atomic_fetch_min and
__atomic_fetch_max builtins are implemented by the compiler. If not, fall back
to a CAS loop.
This patch was bootstrapped and regtested on aarch64-linux-gnu and
x86_64-linux-gnu, no regression.
Signed-off-by: Soumya AR <soumyaa@nvidia.com>
libstdc++-v3/ChangeLog:
* include/bits/atomic_base.h:
Add fetch_min and fetch_max memberfunctions.
* include/bits/version.def:
Add __cpp_lib_atomic_min_max feature test macro.
* include/bits/version.h (defined): Regenerate.
* include/std/atomic: Extend for fetch_min/max non-member functions.
* src/c++23/std.cc.in: Export atomic_fetch_min, atomic_fetch_max,
atomic_fetch_min_explicit, atomic_fetch_max_explicit.
* testsuite/29_atomics/atomic_integral/nonmembers_fetch_minmax.cc:
New test.
* testsuite/29_atomics/atomic_ref/integral_fetch_minmax.cc: New test.
Diffstat (limited to 'libjava/gnu/java')
0 files changed, 0 insertions, 0 deletions
