diff options
author | Louis Dionne <ldionne.2@gmail.com> | 2024-01-30 08:35:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-30 08:35:15 -0500 |
commit | 7162fd750ee5f786f3b9b7a7b26b72ee36ce772e (patch) | |
tree | 785cfd80bdb7a32597f69ef8971cbd559bb43055 /libcxxabi | |
parent | f89d707e5f5e531fb854f70e02d9eaa32aaf19bd (diff) | |
download | llvm-7162fd750ee5f786f3b9b7a7b26b72ee36ce772e.zip llvm-7162fd750ee5f786f3b9b7a7b26b72ee36ce772e.tar.gz llvm-7162fd750ee5f786f3b9b7a7b26b72ee36ce772e.tar.bz2 |
[libc++] Split the monolithic __threading_support header (#79654)
The <__threading_support> header is a huge beast and it's really
difficult to navigate. I find myself struggling to find what I want
every time I have to open it, and I've been considering splitting it up
for years for that reason.
This patch aims not to contain any functional change. The various
implementations of the threading base are simply moved to separate
headers and then the individual headers are simplified in mechanical
ways. For example, we used to have redundant declarations of all the
functions at the top of `__threading_support`, and those are removed
since they are not needed anymore. The various #ifdefs are also
simplified and removed when they become unnecessary.
Finally, this patch adds documentation for the API we expect from any
threading implementation.
Diffstat (limited to 'libcxxabi')
-rw-r--r-- | libcxxabi/src/cxa_exception_storage.cpp | 2 | ||||
-rw-r--r-- | libcxxabi/src/cxa_guard_impl.h | 2 | ||||
-rw-r--r-- | libcxxabi/src/cxa_thread_atexit.cpp | 2 | ||||
-rw-r--r-- | libcxxabi/src/fallback_malloc.cpp | 2 | ||||
-rw-r--r-- | libcxxabi/test/test_fallback_malloc.pass.cpp | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/libcxxabi/src/cxa_exception_storage.cpp b/libcxxabi/src/cxa_exception_storage.cpp index 3a3233a..2479f55 100644 --- a/libcxxabi/src/cxa_exception_storage.cpp +++ b/libcxxabi/src/cxa_exception_storage.cpp @@ -12,7 +12,7 @@ #include "cxa_exception.h" -#include <__threading_support> +#include <__thread/support.h> #if defined(_LIBCXXABI_HAS_NO_THREADS) diff --git a/libcxxabi/src/cxa_guard_impl.h b/libcxxabi/src/cxa_guard_impl.h index e00d54b..7b140d3 100644 --- a/libcxxabi/src/cxa_guard_impl.h +++ b/libcxxabi/src/cxa_guard_impl.h @@ -55,7 +55,7 @@ # endif #endif -#include <__threading_support> +#include <__thread/support.h> #include <cstdint> #include <cstring> #include <limits.h> diff --git a/libcxxabi/src/cxa_thread_atexit.cpp b/libcxxabi/src/cxa_thread_atexit.cpp index 665f9e5..c6bd0aa 100644 --- a/libcxxabi/src/cxa_thread_atexit.cpp +++ b/libcxxabi/src/cxa_thread_atexit.cpp @@ -8,7 +8,7 @@ #include "abort_message.h" #include "cxxabi.h" -#include <__threading_support> +#include <__thread/support.h> #ifndef _LIBCXXABI_HAS_NO_THREADS #if defined(__ELF__) && defined(_LIBCXXABI_LINK_PTHREAD_LIB) #pragma comment(lib, "pthread") diff --git a/libcxxabi/src/fallback_malloc.cpp b/libcxxabi/src/fallback_malloc.cpp index fa802b2..76bd2e9 100644 --- a/libcxxabi/src/fallback_malloc.cpp +++ b/libcxxabi/src/fallback_malloc.cpp @@ -9,7 +9,7 @@ #include "fallback_malloc.h" #include "abort_message.h" -#include <__threading_support> +#include <__thread/support.h> #ifndef _LIBCXXABI_HAS_NO_THREADS #if defined(__ELF__) && defined(_LIBCXXABI_LINK_PTHREAD_LIB) #pragma comment(lib, "pthread") diff --git a/libcxxabi/test/test_fallback_malloc.pass.cpp b/libcxxabi/test/test_fallback_malloc.pass.cpp index 265a7a3..c8a6a07 100644 --- a/libcxxabi/test/test_fallback_malloc.pass.cpp +++ b/libcxxabi/test/test_fallback_malloc.pass.cpp @@ -11,7 +11,7 @@ #include <cassert> #include <inttypes.h> -#include <__threading_support> +#include <__thread/support.h> // UNSUPPORTED: c++03 // UNSUPPORTED: modules-build && no-threads |