[libcxx-commits] [PATCH] D87323: Bring atomic header closer to C++20

Olivier Giroux via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 8 12:42:53 PDT 2020


__simt__ created this revision.
__simt__ added a reviewer: ldionne.
Herald added a reviewer: jfb.
Herald added a reviewer: jfb.
Herald added subscribers: libcxx-commits, jfb, dexonsmith.
Herald added a project: libc++.
Herald added a reviewer: libc++.
__simt__ requested review of this revision.

This patch:

1. Adds missing feature test macros for atomic
2. Updates the synopsis of atomic to match what's in the file
3. Fills out the implemented features table
4. Correctly uses the dependent types on atomic free functions
5. Correctly uses memcpy in non-lock-free atomic CAS
6. Adds missing tests for atomic_flag member functions
7. Adds missing test cases for non-lock-free atomic objects

It seems to have also picked up some feature-test macro generated tests that were missing (?).

At present I have tested only on Linux but I'll test on Mac before submitting.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87323

Files:
  libcxx/docs/FeatureTestMacroTable.rst
  libcxx/include/atomic
  libcxx/include/version
  libcxx/test/std/atomics/atomics.flag/atomic_flag_test.pass.cpp
  libcxx/test/std/atomics/atomics.flag/atomic_flag_test_explicit.pass.cpp
  libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange_explicit.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and_explicit.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or_explicit.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor_explicit.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_helpers.h
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_load_explicit.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store.pass.cpp
  libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_store_explicit.pass.cpp
  libcxx/test/std/atomics/types.pass.cpp
  libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp
  libcxx/test/std/language.support/support.limits/support.limits.general/concepts.version.pass.cpp
  libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.pass.cpp
  libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp
  libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
  libcxx/test/support/cmpxchg_loop.h
  libcxx/utils/generate_feature_test_macro_components.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87323.290563.patch
Type: text/x-patch
Size: 97460 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200908/174a0443/attachment-0001.bin>


More information about the libcxx-commits mailing list