llvm-project/libcxx/include/__memory
Louis Dionne 92832e4889 [libc++] Enable <atomic> when threads are disabled
std::atomic is, for the most part, just a thin veneer on top of compiler
builtins. Hence, it should be available even when threads are not available
on the system, and in fact there has been requests for such support.

This patch:
- Moves __libcpp_thread_poll_with_backoff to its own header so it can
  be used in <atomic> when threads are disabled.
- Adds a dummy backoff policy for atomic polling that doesn't know about
  threads.
- Adjusts the <atomic> feature-test macros so they are provided even when
  threads are disabled.
- Runs the <atomic> tests when threads are disabled.

rdar://77873569

Differential Revision: https://reviews.llvm.org/D114109
2021-11-17 23:02:58 -05:00
..
addressof.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
allocation_guard.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
allocator.h [libcxx] Make allocator<T>:allocate throw bad_array_new_length 2021-10-18 19:12:42 +01:00
allocator_arg_t.h [libc++][NFC] Fix include guard for some detail header 2021-10-04 13:36:08 -04:00
allocator_traits.h [libc++] P0433R2: test that deduction guides are properly SFINAEd away. 2021-11-09 09:32:24 -08:00
auto_ptr.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
compressed_pair.h [libc++] Remove workarounds for [[nodebug]] not working properly on typedefs in older Clangs 2021-09-01 10:51:09 -04:00
construct_at.h [libc++] Use enable_if_t instead of _EnableIf 2021-09-08 09:09:28 -04:00
pointer_traits.h [libc++][NFC] Rename _EnableIf to __enable_if_t for consistency 2021-09-08 15:20:58 -04:00
raw_storage_iterator.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
shared_ptr.h [libc++] Enable <atomic> when threads are disabled 2021-11-17 23:02:58 -05:00
temporary_buffer.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
uninitialized_algorithms.h [libc++] Comma-operator-proof a lot of algorithm/container code. 2021-09-08 13:34:01 -04:00
unique_ptr.h [libc++] Remove workarounds for [[nodebug]] not working properly on typedefs in older Clangs 2021-09-01 10:51:09 -04:00
uses_allocator.h [libc++][NFCI] Remove uses of _LIBCPP_INLINE_VAR 2021-09-22 16:03:00 -04:00