darling-libcxx/include
Eric Fiselier 66134e8a5f [libc++] Cleanup and document <__threading_support>
Summary:
This patch attempts to clean up the macro configuration mess in `<__threading_support>`, specifically the mess involving external threading variants. Additionally this patch adds design documentation for `<__threading_support>` and the configuration macros it uses.

The primary change in this patch is separating the idea of an "external API" provided by `<__external_threading>` and the idea of having an external threading library. Now `_LIBCPP_HAS_THREAD_API_EXTERNAL` means that libc++ should use `<__external_threading>` and that the header is expected to exist.  Additionally the new macro `_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL` is now used to configure for using an "external library"  with the default threading API.

Reviewers: compnerd, rmaprath

Subscribers: smeenai, cfe-commits, mgorny

Differential Revision: https://reviews.llvm.org/D28316

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291275 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-06 20:05:40 +00:00
..
experimental [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
ext [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
support Refactor bitscan64 check 2017-01-04 01:53:24 +00:00
__bit_reference fix sign comparison warnings 2016-12-24 00:24:44 +00:00
__bsd_locale_defaults.h Reorganize _LIBCPP_LOCALE__L_EXTENSIONS 2016-03-09 15:39:39 +00:00
__bsd_locale_fallbacks.h Reorganize _LIBCPP_LOCALE__L_EXTENSIONS 2016-03-09 15:39:39 +00:00
__config [libc++] Cleanup and document <__threading_support> 2017-01-06 20:05:40 +00:00
__config_site.in [libc++] Cleanup and document <__threading_support> 2017-01-06 20:05:40 +00:00
__debug [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
__functional_03 [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
__functional_base [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
__functional_base_03 [libcxx] Rewrite C++03 __invoke. 2015-08-26 20:15:02 +00:00
__hash_table [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
__libcpp_version Add __libcpp_version file and __libcpp_library_version function. 2016-10-28 06:06:50 +00:00
__locale [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
__mutex_base [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
__nullptr [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
__refstring [libc++] Fix modules build - Rework __refstring definition 2016-10-25 19:33:14 +00:00
__split_buffer Cleanup: move visibility/linkage attributes to the first declaration. 2015-11-07 01:22:13 +00:00
__sso_allocator Handle function name conflicts in _LIBCPP_MSVCRT mode 2015-02-13 22:15:32 +00:00
__std_stream clean up some qualifier casting 2016-12-31 18:13:34 +00:00
__string [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
__threading_support [libc++] Cleanup and document <__threading_support> 2017-01-06 20:05:40 +00:00
__tree [libcxx] Fix PR31402: map::__find_equal_key has undefined behavior. 2017-01-05 06:06:18 +00:00
__tuple [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
__undef___deallocate Add option to disable __deallocate #warning 2016-07-12 14:39:13 +00:00
__undef_min_max Add option to disable __deallocate #warning 2016-07-12 14:39:13 +00:00
algorithm Fix __wrap_iter in debug mode and apply _NOEXCEPT_DEBUG to it 2016-12-28 05:35:32 +00:00
any [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
array [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
atomic Remove _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS 2016-11-18 06:42:17 +00:00
bitset [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
cassert Windows support by Ruben Van Boxem. 2011-10-17 20:05:10 +00:00
ccomplex Windows support by Ruben Van Boxem. 2011-10-17 20:05:10 +00:00
cctype Put back the undefs that Richard removed. Boost won't build w/o these; specifically the file 'bytes_methods.h' in Apple's python framework defines these. 2016-04-04 22:49:20 +00:00
cerrno Split <errno.h> out of <cerrno>. 2015-10-08 20:37:11 +00:00
cfenv Fix incorrect file header. This is <cfenv> not <cctype>. 2015-10-08 21:17:21 +00:00
cfloat Split <float.h> out of <cfloat>. 2015-10-08 20:37:44 +00:00
chrono [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
cinttypes Split <inttypes.h> out of <cinttypes>. 2015-10-08 20:38:53 +00:00
ciso646 Windows support by Ruben Van Boxem. 2011-10-17 20:05:10 +00:00
climits Windows support by Ruben Van Boxem. 2011-10-17 20:05:10 +00:00
clocale Make support for thread-unsafe C functions optional. 2015-06-24 08:44:38 +00:00
CMakeLists.txt Simplify CMake target for the __generated_config header 2017-01-03 11:18:17 +00:00
cmath [CUDA] Mark __libcpp_{isnan,isinf,isfinite} as constexpr. 2016-11-15 19:15:57 +00:00
codecvt [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
complex [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
complex.h PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths. 2015-10-09 00:26:50 +00:00
condition_variable Cleanup: move visibility/linkage attributes to the first declaration. 2015-11-07 01:22:13 +00:00
csetjmp Split <setjmp.h> out of <csetjmp>. 2015-10-08 20:41:26 +00:00
csignal Windows support by Ruben Van Boxem. 2011-10-17 20:05:10 +00:00
cstdarg Windows support by Ruben Van Boxem. 2011-10-17 20:05:10 +00:00
cstdbool Windows support by Ruben Van Boxem. 2011-10-17 20:05:10 +00:00
cstddef PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths. 2015-10-09 00:26:50 +00:00
cstdint Windows support by Ruben Van Boxem. 2011-10-17 20:05:10 +00:00
cstdio [libc++] Remove unnecessary MSVCRT exclusions 2016-11-08 03:31:42 +00:00
cstdlib Remove mblen(), mbtowc() and wctomb() from the thread-unsafe functions. 2016-12-30 10:44:00 +00:00
cstring Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr from 2016-02-10 00:59:02 +00:00
ctgmath Windows support by Ruben Van Boxem. 2011-10-17 20:05:10 +00:00
ctime Make support for thread-unsafe C functions optional. 2015-06-24 08:44:38 +00:00
ctype.h PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths. 2015-10-09 00:26:50 +00:00
cwchar [libc++] Remove unnecessary MSVCRT exclusions 2016-11-08 03:31:42 +00:00
cwctype Split <wctype.h> out of <cwctype>. 2015-10-09 19:57:37 +00:00
deque [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
errno.h Cleanup foo.h headers and __config to work in C 2015-11-06 06:30:12 +00:00
exception Fix unused parameters and variables 2016-12-23 23:37:52 +00:00
float.h Cleanup foo.h headers and __config to work in C 2015-11-06 06:30:12 +00:00
forward_list [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
fstream [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
functional [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
future [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
initializer_list [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
inttypes.h [include] Declare __STDC_*_MACROS for C++11 compat in old libc 2016-09-26 20:20:00 +00:00
iomanip Move 'quoted' for string_view from <string_view> to <iomanip> (where the other versions of 'quoted' live. No functional change. 2016-10-27 15:10:07 +00:00
ios [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
iosfwd [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
iostream Make the presence of stdin and stdout optional. 2015-03-26 14:35:46 +00:00
istream [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
iterator [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
limits [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
limits.h [libcxx] Fix gcc build. 2016-10-10 15:56:01 +00:00
list [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
locale [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
locale.h [libcxx] Implement locale.h to fix modules build 2016-11-19 01:14:15 +00:00
map [libcxx] Fix PR31402: map::__find_equal_key has undefined behavior. 2017-01-05 06:06:18 +00:00
math.h [libc++] Remove math_win32.h 2016-09-24 06:27:28 +00:00
memory Fix PR26961 - Add default constructor to std::pointer_safety struct. 2017-01-05 01:28:40 +00:00
module.modulemap Fix _LIBCPP_VERSION tests with modules on Darwin 2016-12-08 06:37:41 +00:00
mutex thread_support: split out {,non-}recursive mutex 2017-01-05 17:54:45 +00:00
new Fix use of throw(...) spec with GCC in C++17 2017-01-02 23:27:42 +00:00
numeric Fixes for LWG 2598, 2686, 2739, 2742, 2747, and 2759, which were adopted last week in Issaquah 2016-11-14 18:22:19 +00:00
optional [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
ostream [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
queue [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
random [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
ratio [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
regex [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
scoped_allocator [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
set [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
setjmp.h Cleanup foo.h headers and __config to work in C 2015-11-06 06:30:12 +00:00
shared_mutex Qualify calls to addressof to avoid getting ADL. Fixes PR#27254. 2016-04-13 17:02:23 +00:00
sstream [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
stack [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
stdbool.h Add stdbool.h wrapper for libc++ 2016-02-20 00:16:41 +00:00
stddef.h PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths. 2015-10-09 00:26:50 +00:00
stdexcept Fix unused parameters and variables 2016-12-23 23:37:52 +00:00
stdint.h [include] Declare __STDC_*_MACROS for C++11 compat in old libc 2016-09-26 20:20:00 +00:00
stdio.h Split <stdio.h> out of <cstdio>. 2015-10-09 01:29:09 +00:00
stdlib.h Cleanup foo.h headers and __config to work in C 2015-11-06 06:30:12 +00:00
streambuf [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
string [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
string_view [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
string.h Instead of asking glibc to provide correct C++ signatures for <string.h> 2016-02-11 23:51:02 +00:00
strstream No functionality change at this time. I've split _LIBCPP_VISIBLE up into two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute. 2013-03-06 23:30:19 +00:00
system_error [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
tgmath.h Windows support by Ruben Van Boxem. 2011-10-17 20:05:10 +00:00
thread [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
tuple [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
type_traits [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
typeindex [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
typeinfo typeinfo: style adjustments for adding MS ABI RTTI 2017-01-05 21:22:22 +00:00
unordered_map [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
unordered_set [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
utility [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
valarray [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
variant [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
vector [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS 2017-01-04 23:56:00 +00:00
wchar.h Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr from 2016-02-10 00:59:02 +00:00
wctype.h Split <wctype.h> out of <cwctype>. 2015-10-09 19:57:37 +00:00