[libcxx-commits] [libcxx] 053d9e5 - [libc++] Move __thread_id out of <__threading_support>
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 11 05:58:45 PDT 2023
Author: Louis Dionne
Date: 2023-07-11T08:58:27-04:00
New Revision: 053d9e5832c73e18bc6bf4b09e47fdd2d0ea04b7
URL: https://github.com/llvm/llvm-project/commit/053d9e5832c73e18bc6bf4b09e47fdd2d0ea04b7
DIFF: https://github.com/llvm/llvm-project/commit/053d9e5832c73e18bc6bf4b09e47fdd2d0ea04b7.diff
LOG: [libc++] Move __thread_id out of <__threading_support>
This makes <__threading_support> closer to handling only the bridge
between the system's implementation of threading and the rest of libc++.
Differential Revision: https://reviews.llvm.org/D154464
Added:
libcxx/include/__thread/id.h
Modified:
libcxx/docs/ReleaseNotes.rst
libcxx/include/CMakeLists.txt
libcxx/include/__condition_variable/condition_variable.h
libcxx/include/__thread/formatter.h
libcxx/include/__thread/thread.h
libcxx/include/__threading_support
libcxx/include/module.modulemap.in
libcxx/include/mutex
libcxx/src/mutex.cpp
libcxx/test/libcxx/transitive_includes/cxx03.csv
libcxx/test/libcxx/transitive_includes/cxx11.csv
libcxx/test/libcxx/transitive_includes/cxx14.csv
libcxx/test/libcxx/transitive_includes/cxx17.csv
libcxx/test/libcxx/transitive_includes/cxx20.csv
libcxx/test/libcxx/transitive_includes/cxx23.csv
libcxx/test/libcxx/transitive_includes/cxx26.csv
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp
libcxx/utils/data/ignore_format.txt
Removed:
################################################################################
diff --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst
index c838c2a54a8071..32fd158f32fdb2 100644
--- a/libcxx/docs/ReleaseNotes.rst
+++ b/libcxx/docs/ReleaseNotes.rst
@@ -100,6 +100,9 @@ Deprecations and Removals
- ``<string>``, ``<string_view>``, and ``<mutex>`` no longer include ``<functional>``
in any C++ version (it was previously included in C++20 and earlier).
+- ``<atomic>``, ``<barrier>``, ``<latch>``, ``<numeric>``, ``<semaphore>`` and ``<shared_mutex>`` no longer include ``<iosfwd>``
+ (it was previously included in all Standard versions).
+
- The headers ``<experimental/algorithm>`` and ``<experimental/functional>`` have been removed, since all the contents
have been implemented in namespace ``std`` for at least two releases.
diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt
index 0a14e89ee13baf..8d2cfc8f61ef87 100644
--- a/libcxx/include/CMakeLists.txt
+++ b/libcxx/include/CMakeLists.txt
@@ -676,6 +676,7 @@ set(files
__system_error/error_condition.h
__system_error/system_error.h
__thread/formatter.h
+ __thread/id.h
__thread/poll_with_backoff.h
__thread/this_thread.h
__thread/thread.h
diff --git a/libcxx/include/__condition_variable/condition_variable.h b/libcxx/include/__condition_variable/condition_variable.h
index 8ff49963834f34..7cbf21fe7311e8 100644
--- a/libcxx/include/__condition_variable/condition_variable.h
+++ b/libcxx/include/__condition_variable/condition_variable.h
@@ -20,6 +20,7 @@
#include <__type_traits/enable_if.h>
#include <__type_traits/is_floating_point.h>
#include <__utility/move.h>
+#include <limits>
#include <ratio>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__thread/formatter.h b/libcxx/include/__thread/formatter.h
index 97cd23c51e9bff..abed0922a83582 100644
--- a/libcxx/include/__thread/formatter.h
+++ b/libcxx/include/__thread/formatter.h
@@ -17,7 +17,7 @@
#include <__format/formatter.h>
#include <__format/formatter_integral.h>
#include <__format/parser_std_format_spec.h>
-#include <__threading_support>
+#include <__thread/id.h>
#include <__type_traits/conditional.h>
#include <__type_traits/is_pointer.h>
#include <__type_traits/is_same.h>
diff --git a/libcxx/include/__thread/id.h b/libcxx/include/__thread/id.h
new file mode 100644
index 00000000000000..533f8500622fb8
--- /dev/null
+++ b/libcxx/include/__thread/id.h
@@ -0,0 +1,147 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___THREAD_ID_H
+#define _LIBCPP___THREAD_ID_H
+
+#include <__compare/ordering.h>
+#include <__config>
+#include <__fwd/hash.h>
+#include <__threading_support>
+#include <iosfwd>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#ifndef _LIBCPP_HAS_NO_THREADS
+
+class _LIBCPP_EXPORTED_FROM_ABI thread;
+class _LIBCPP_EXPORTED_FROM_ABI __thread_id;
+
+namespace this_thread
+{
+
+_LIBCPP_INLINE_VISIBILITY __thread_id get_id() _NOEXCEPT;
+
+} // namespace this_thread
+
+template<> struct hash<__thread_id>;
+
+class _LIBCPP_TEMPLATE_VIS __thread_id
+{
+ // FIXME: pthread_t is a pointer on Darwin but a long on Linux.
+ // NULL is the no-thread value on Darwin. Someone needs to check
+ // on other platforms. We assume 0 works everywhere for now.
+ __libcpp_thread_id __id_;
+
+ static _LIBCPP_HIDE_FROM_ABI
+ bool __lt_impl(__thread_id __x, __thread_id __y) _NOEXCEPT
+ { // id==0 is always less than any other thread_id
+ if (__x.__id_ == 0) return __y.__id_ != 0;
+ if (__y.__id_ == 0) return false;
+ return __libcpp_thread_id_less(__x.__id_, __y.__id_);
+ }
+
+public:
+ _LIBCPP_INLINE_VISIBILITY
+ __thread_id() _NOEXCEPT : __id_(0) {}
+
+ _LIBCPP_INLINE_VISIBILITY
+ void __reset() { __id_ = 0; }
+
+ friend _LIBCPP_HIDE_FROM_ABI bool operator==(__thread_id __x, __thread_id __y) _NOEXCEPT;
+#if _LIBCPP_STD_VER <= 17
+ friend _LIBCPP_HIDE_FROM_ABI bool operator<(__thread_id __x, __thread_id __y) _NOEXCEPT;
+#else // _LIBCPP_STD_VER <= 17
+ friend _LIBCPP_HIDE_FROM_ABI strong_ordering operator<=>(__thread_id __x, __thread_id __y) noexcept;
+#endif // _LIBCPP_STD_VER <= 17
+
+ template<class _CharT, class _Traits>
+ friend
+ _LIBCPP_INLINE_VISIBILITY
+ basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __os, __thread_id __id);
+
+private:
+ _LIBCPP_INLINE_VISIBILITY
+ __thread_id(__libcpp_thread_id __id) : __id_(__id) {}
+
+ _LIBCPP_HIDE_FROM_ABI friend __libcpp_thread_id __get_underlying_id(const __thread_id __id) { return __id.__id_; }
+
+ friend __thread_id this_thread::get_id() _NOEXCEPT;
+ friend class _LIBCPP_EXPORTED_FROM_ABI thread;
+ friend struct _LIBCPP_TEMPLATE_VIS hash<__thread_id>;
+};
+
+inline _LIBCPP_HIDE_FROM_ABI
+bool operator==(__thread_id __x, __thread_id __y) _NOEXCEPT {
+ // Don't pass id==0 to underlying routines
+ if (__x.__id_ == 0)
+ return __y.__id_ == 0;
+ if (__y.__id_ == 0)
+ return false;
+ return __libcpp_thread_id_equal(__x.__id_, __y.__id_);
+}
+
+#if _LIBCPP_STD_VER <= 17
+
+inline _LIBCPP_HIDE_FROM_ABI
+bool operator!=(__thread_id __x, __thread_id __y) _NOEXCEPT {
+ return !(__x == __y);
+}
+
+inline _LIBCPP_HIDE_FROM_ABI
+bool operator<(__thread_id __x, __thread_id __y) _NOEXCEPT {
+ return __thread_id::__lt_impl(__x.__id_, __y.__id_);
+}
+
+inline _LIBCPP_HIDE_FROM_ABI bool operator<=(__thread_id __x, __thread_id __y) _NOEXCEPT { return !(__y < __x); }
+inline _LIBCPP_HIDE_FROM_ABI bool operator>(__thread_id __x, __thread_id __y) _NOEXCEPT { return __y < __x; }
+inline _LIBCPP_HIDE_FROM_ABI bool operator>=(__thread_id __x, __thread_id __y) _NOEXCEPT { return !(__x < __y); }
+
+#else // _LIBCPP_STD_VER <= 17
+
+inline _LIBCPP_HIDE_FROM_ABI
+strong_ordering operator<=>(__thread_id __x, __thread_id __y) noexcept {
+ if (__x == __y)
+ return strong_ordering::equal;
+ if (__thread_id::__lt_impl(__x, __y))
+ return strong_ordering::less;
+ return strong_ordering::greater;
+}
+
+#endif // _LIBCPP_STD_VER <= 17
+
+namespace this_thread
+{
+
+_LIBCPP_INLINE_VISIBILITY __thread_id get_id() _NOEXCEPT;
+
+} // namespace this_thread
+
+namespace this_thread
+{
+
+inline _LIBCPP_INLINE_VISIBILITY
+__thread_id
+get_id() _NOEXCEPT
+{
+ return __libcpp_thread_get_current_id();
+}
+
+} // namespace this_thread
+
+#endif // !_LIBCPP_HAS_NO_THREADS
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___THREAD_ID_H
diff --git a/libcxx/include/__thread/thread.h b/libcxx/include/__thread/thread.h
index 2b329fd55010dc..3d52d87f702689 100644
--- a/libcxx/include/__thread/thread.h
+++ b/libcxx/include/__thread/thread.h
@@ -18,8 +18,10 @@
#include <__memory/unique_ptr.h>
#include <__mutex/mutex.h>
#include <__system_error/system_error.h>
+#include <__thread/id.h>
#include <__threading_support>
#include <__utility/forward.h>
+#include <iosfwd>
#include <tuple>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__threading_support b/libcxx/include/__threading_support
index cc0e344d08f127..2e6bfbd78737fe 100644
--- a/libcxx/include/__threading_support
+++ b/libcxx/include/__threading_support
@@ -13,13 +13,9 @@
#include <__availability>
#include <__chrono/convert_to_timespec.h>
#include <__chrono/duration.h>
-#include <__compare/ordering.h>
#include <__config>
-#include <__fwd/hash.h>
#include <__thread/poll_with_backoff.h>
#include <errno.h>
-#include <iosfwd>
-#include <limits>
#ifdef __MVS__
# include <__support/ibm/nanosleep.h>
@@ -589,118 +585,8 @@ int __libcpp_tls_set(__libcpp_tls_key __key, void *__p)
#endif
-
#endif // !_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL || _LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL
-class _LIBCPP_EXPORTED_FROM_ABI thread;
-class _LIBCPP_EXPORTED_FROM_ABI __thread_id;
-
-namespace this_thread
-{
-
-_LIBCPP_INLINE_VISIBILITY __thread_id get_id() _NOEXCEPT;
-
-} // namespace this_thread
-
-template<> struct hash<__thread_id>;
-
-class _LIBCPP_TEMPLATE_VIS __thread_id
-{
- // FIXME: pthread_t is a pointer on Darwin but a long on Linux.
- // NULL is the no-thread value on Darwin. Someone needs to check
- // on other platforms. We assume 0 works everywhere for now.
- __libcpp_thread_id __id_;
-
- static _LIBCPP_HIDE_FROM_ABI
- bool __lt_impl(__thread_id __x, __thread_id __y) _NOEXCEPT
- { // id==0 is always less than any other thread_id
- if (__x.__id_ == 0) return __y.__id_ != 0;
- if (__y.__id_ == 0) return false;
- return __libcpp_thread_id_less(__x.__id_, __y.__id_);
- }
-
-public:
- _LIBCPP_INLINE_VISIBILITY
- __thread_id() _NOEXCEPT : __id_(0) {}
-
- _LIBCPP_INLINE_VISIBILITY
- void __reset() { __id_ = 0; }
-
- friend _LIBCPP_HIDE_FROM_ABI bool operator==(__thread_id __x, __thread_id __y) _NOEXCEPT;
-#if _LIBCPP_STD_VER <= 17
- friend _LIBCPP_HIDE_FROM_ABI bool operator<(__thread_id __x, __thread_id __y) _NOEXCEPT;
-#else // _LIBCPP_STD_VER <= 17
- friend _LIBCPP_HIDE_FROM_ABI strong_ordering operator<=>(__thread_id __x, __thread_id __y) noexcept;
-#endif // _LIBCPP_STD_VER <= 17
-
- template<class _CharT, class _Traits>
- friend
- _LIBCPP_INLINE_VISIBILITY
- basic_ostream<_CharT, _Traits>&
- operator<<(basic_ostream<_CharT, _Traits>& __os, __thread_id __id);
-
-private:
- _LIBCPP_INLINE_VISIBILITY
- __thread_id(__libcpp_thread_id __id) : __id_(__id) {}
-
- _LIBCPP_HIDE_FROM_ABI friend __libcpp_thread_id __get_underlying_id(const __thread_id __id) { return __id.__id_; }
-
- friend __thread_id this_thread::get_id() _NOEXCEPT;
- friend class _LIBCPP_EXPORTED_FROM_ABI thread;
- friend struct _LIBCPP_TEMPLATE_VIS hash<__thread_id>;
-};
-
-inline _LIBCPP_HIDE_FROM_ABI
-bool operator==(__thread_id __x, __thread_id __y) _NOEXCEPT {
- // Don't pass id==0 to underlying routines
- if (__x.__id_ == 0)
- return __y.__id_ == 0;
- if (__y.__id_ == 0)
- return false;
- return __libcpp_thread_id_equal(__x.__id_, __y.__id_);
-}
-
-#if _LIBCPP_STD_VER <= 17
-
-inline _LIBCPP_HIDE_FROM_ABI
-bool operator!=(__thread_id __x, __thread_id __y) _NOEXCEPT {
- return !(__x == __y);
-}
-
-inline _LIBCPP_HIDE_FROM_ABI
-bool operator<(__thread_id __x, __thread_id __y) _NOEXCEPT {
- return __thread_id::__lt_impl(__x.__id_, __y.__id_);
-}
-
-inline _LIBCPP_HIDE_FROM_ABI bool operator<=(__thread_id __x, __thread_id __y) _NOEXCEPT { return !(__y < __x); }
-inline _LIBCPP_HIDE_FROM_ABI bool operator>(__thread_id __x, __thread_id __y) _NOEXCEPT { return __y < __x; }
-inline _LIBCPP_HIDE_FROM_ABI bool operator>=(__thread_id __x, __thread_id __y) _NOEXCEPT { return !(__x < __y); }
-
-#else // _LIBCPP_STD_VER <= 17
-
-inline _LIBCPP_HIDE_FROM_ABI
-strong_ordering operator<=>(__thread_id __x, __thread_id __y) noexcept {
- if (__x == __y)
- return strong_ordering::equal;
- if (__thread_id::__lt_impl(__x, __y))
- return strong_ordering::less;
- return strong_ordering::greater;
-}
-
-#endif // _LIBCPP_STD_VER <= 17
-
-namespace this_thread
-{
-
-inline _LIBCPP_INLINE_VISIBILITY
-__thread_id
-get_id() _NOEXCEPT
-{
- return __libcpp_thread_get_current_id();
-}
-
-} // namespace this_thread
-
#endif // !_LIBCPP_HAS_NO_THREADS
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/module.modulemap.in b/libcxx/include/module.modulemap.in
index 49d3f122d8c5d1..62e391df5dc2eb 100644
--- a/libcxx/include/module.modulemap.in
+++ b/libcxx/include/module.modulemap.in
@@ -1619,6 +1619,7 @@ module std [system] {
module __thread {
module formatter { private header "__thread/formatter.h" }
+ module id { private header "__thread/id.h" }
module poll_with_backoff { private header "__thread/poll_with_backoff.h" }
module this_thread { private header "__thread/this_thread.h" }
module thread { private header "__thread/thread.h" }
diff --git a/libcxx/include/mutex b/libcxx/include/mutex
index a77d31f6e22b00..320899a9e3ffa5 100644
--- a/libcxx/include/mutex
+++ b/libcxx/include/mutex
@@ -196,9 +196,11 @@ template<class Callable, class ...Args>
#include <__mutex/mutex.h>
#include <__mutex/tag_types.h>
#include <__mutex/unique_lock.h>
+#include <__thread/id.h>
#include <__threading_support>
#include <__utility/forward.h>
#include <cstdint>
+#include <limits>
#ifndef _LIBCPP_CXX03_LANG
# include <tuple>
#endif
diff --git a/libcxx/src/mutex.cpp b/libcxx/src/mutex.cpp
index 0cb5d0c4517ff1..b3b84c4dc430dc 100644
--- a/libcxx/src/mutex.cpp
+++ b/libcxx/src/mutex.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include <__assert>
+#include <__thread/id.h>
#include <limits>
#include <mutex>
diff --git a/libcxx/test/libcxx/transitive_includes/cxx03.csv b/libcxx/test/libcxx/transitive_includes/cxx03.csv
index 63705e7cae5c89..90c0885f64982f 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx03.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx03.csv
@@ -58,7 +58,6 @@ atomic cstdint
atomic cstdlib
atomic cstring
atomic ctime
-atomic iosfwd
atomic limits
atomic ratio
atomic type_traits
@@ -69,7 +68,6 @@ barrier cstddef
barrier cstdint
barrier cstring
barrier ctime
-barrier iosfwd
barrier iterator
barrier limits
barrier memory
@@ -173,7 +171,6 @@ condition_variable cstdlib
condition_variable cstring
condition_variable ctime
condition_variable initializer_list
-condition_variable iosfwd
condition_variable limits
condition_variable new
condition_variable ratio
@@ -455,7 +452,6 @@ latch cstddef
latch cstdint
latch cstring
latch ctime
-latch iosfwd
latch limits
latch ratio
latch type_traits
@@ -591,7 +587,6 @@ numeric ctime
numeric execution
numeric functional
numeric initializer_list
-numeric iosfwd
numeric iterator
numeric limits
numeric new
@@ -729,7 +724,6 @@ semaphore cstddef
semaphore cstdint
semaphore cstring
semaphore ctime
-semaphore iosfwd
semaphore limits
semaphore ratio
semaphore type_traits
@@ -751,7 +745,6 @@ set version
shared_mutex cerrno
shared_mutex cstddef
shared_mutex ctime
-shared_mutex iosfwd
shared_mutex limits
shared_mutex ratio
shared_mutex stdexcept
diff --git a/libcxx/test/libcxx/transitive_includes/cxx11.csv b/libcxx/test/libcxx/transitive_includes/cxx11.csv
index 389b8ae03a9ec8..d122ee7edd4230 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx11.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx11.csv
@@ -58,7 +58,6 @@ atomic cstdint
atomic cstdlib
atomic cstring
atomic ctime
-atomic iosfwd
atomic limits
atomic ratio
atomic type_traits
@@ -69,7 +68,6 @@ barrier cstddef
barrier cstdint
barrier cstring
barrier ctime
-barrier iosfwd
barrier iterator
barrier limits
barrier memory
@@ -173,7 +171,6 @@ condition_variable cstdlib
condition_variable cstring
condition_variable ctime
condition_variable initializer_list
-condition_variable iosfwd
condition_variable limits
condition_variable new
condition_variable ratio
@@ -455,7 +452,6 @@ latch cstddef
latch cstdint
latch cstring
latch ctime
-latch iosfwd
latch limits
latch ratio
latch type_traits
@@ -592,7 +588,6 @@ numeric ctime
numeric execution
numeric functional
numeric initializer_list
-numeric iosfwd
numeric iterator
numeric limits
numeric new
@@ -730,7 +725,6 @@ semaphore cstddef
semaphore cstdint
semaphore cstring
semaphore ctime
-semaphore iosfwd
semaphore limits
semaphore ratio
semaphore type_traits
@@ -752,7 +746,6 @@ set version
shared_mutex cerrno
shared_mutex cstddef
shared_mutex ctime
-shared_mutex iosfwd
shared_mutex limits
shared_mutex ratio
shared_mutex stdexcept
diff --git a/libcxx/test/libcxx/transitive_includes/cxx14.csv b/libcxx/test/libcxx/transitive_includes/cxx14.csv
index 4c2a2b2c29929b..0ca9ff6aa1d8fa 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx14.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx14.csv
@@ -58,7 +58,6 @@ atomic cstdint
atomic cstdlib
atomic cstring
atomic ctime
-atomic iosfwd
atomic limits
atomic ratio
atomic type_traits
@@ -69,7 +68,6 @@ barrier cstddef
barrier cstdint
barrier cstring
barrier ctime
-barrier iosfwd
barrier iterator
barrier limits
barrier memory
@@ -173,7 +171,6 @@ condition_variable cstdlib
condition_variable cstring
condition_variable ctime
condition_variable initializer_list
-condition_variable iosfwd
condition_variable limits
condition_variable new
condition_variable ratio
@@ -457,7 +454,6 @@ latch cstddef
latch cstdint
latch cstring
latch ctime
-latch iosfwd
latch limits
latch ratio
latch type_traits
@@ -594,7 +590,6 @@ numeric ctime
numeric execution
numeric functional
numeric initializer_list
-numeric iosfwd
numeric iterator
numeric limits
numeric new
@@ -732,7 +727,6 @@ semaphore cstddef
semaphore cstdint
semaphore cstring
semaphore ctime
-semaphore iosfwd
semaphore limits
semaphore ratio
semaphore type_traits
@@ -754,7 +748,6 @@ set version
shared_mutex cerrno
shared_mutex cstddef
shared_mutex ctime
-shared_mutex iosfwd
shared_mutex limits
shared_mutex ratio
shared_mutex stdexcept
diff --git a/libcxx/test/libcxx/transitive_includes/cxx17.csv b/libcxx/test/libcxx/transitive_includes/cxx17.csv
index 4c2a2b2c29929b..0ca9ff6aa1d8fa 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx17.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx17.csv
@@ -58,7 +58,6 @@ atomic cstdint
atomic cstdlib
atomic cstring
atomic ctime
-atomic iosfwd
atomic limits
atomic ratio
atomic type_traits
@@ -69,7 +68,6 @@ barrier cstddef
barrier cstdint
barrier cstring
barrier ctime
-barrier iosfwd
barrier iterator
barrier limits
barrier memory
@@ -173,7 +171,6 @@ condition_variable cstdlib
condition_variable cstring
condition_variable ctime
condition_variable initializer_list
-condition_variable iosfwd
condition_variable limits
condition_variable new
condition_variable ratio
@@ -457,7 +454,6 @@ latch cstddef
latch cstdint
latch cstring
latch ctime
-latch iosfwd
latch limits
latch ratio
latch type_traits
@@ -594,7 +590,6 @@ numeric ctime
numeric execution
numeric functional
numeric initializer_list
-numeric iosfwd
numeric iterator
numeric limits
numeric new
@@ -732,7 +727,6 @@ semaphore cstddef
semaphore cstdint
semaphore cstring
semaphore ctime
-semaphore iosfwd
semaphore limits
semaphore ratio
semaphore type_traits
@@ -754,7 +748,6 @@ set version
shared_mutex cerrno
shared_mutex cstddef
shared_mutex ctime
-shared_mutex iosfwd
shared_mutex limits
shared_mutex ratio
shared_mutex stdexcept
diff --git a/libcxx/test/libcxx/transitive_includes/cxx20.csv b/libcxx/test/libcxx/transitive_includes/cxx20.csv
index dee590204f0919..a1b9ccc99b74e4 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx20.csv
@@ -57,7 +57,6 @@ atomic cstdint
atomic cstdlib
atomic cstring
atomic ctime
-atomic iosfwd
atomic limits
atomic ratio
atomic type_traits
@@ -68,7 +67,6 @@ barrier cstddef
barrier cstdint
barrier cstring
barrier ctime
-barrier iosfwd
barrier iterator
barrier limits
barrier memory
@@ -180,7 +178,6 @@ condition_variable cstdlib
condition_variable cstring
condition_variable ctime
condition_variable initializer_list
-condition_variable iosfwd
condition_variable limits
condition_variable new
condition_variable ratio
@@ -463,7 +460,6 @@ latch cstddef
latch cstdint
latch cstring
latch ctime
-latch iosfwd
latch limits
latch ratio
latch type_traits
@@ -600,7 +596,6 @@ numeric ctime
numeric execution
numeric functional
numeric initializer_list
-numeric iosfwd
numeric iterator
numeric limits
numeric new
@@ -738,7 +733,6 @@ semaphore cstddef
semaphore cstdint
semaphore cstring
semaphore ctime
-semaphore iosfwd
semaphore limits
semaphore ratio
semaphore type_traits
@@ -760,7 +754,6 @@ set version
shared_mutex cerrno
shared_mutex cstddef
shared_mutex ctime
-shared_mutex iosfwd
shared_mutex limits
shared_mutex ratio
shared_mutex stdexcept
diff --git a/libcxx/test/libcxx/transitive_includes/cxx23.csv b/libcxx/test/libcxx/transitive_includes/cxx23.csv
index fd20632ff88986..5d68887113e895 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx23.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx23.csv
@@ -32,7 +32,6 @@ atomic cstdint
atomic cstdlib
atomic cstring
atomic ctime
-atomic iosfwd
atomic limits
atomic ratio
atomic version
@@ -40,7 +39,6 @@ barrier cstddef
barrier cstdint
barrier cstring
barrier ctime
-barrier iosfwd
barrier limits
barrier new
barrier ratio
@@ -330,7 +328,6 @@ latch cstddef
latch cstdint
latch cstring
latch ctime
-latch iosfwd
latch limits
latch ratio
latch version
@@ -427,7 +424,6 @@ numeric cstring
numeric ctime
numeric execution
numeric initializer_list
-numeric iosfwd
numeric limits
numeric new
numeric ratio
@@ -519,7 +515,6 @@ semaphore cstddef
semaphore cstdint
semaphore cstring
semaphore ctime
-semaphore iosfwd
semaphore limits
semaphore ratio
semaphore version
@@ -536,7 +531,6 @@ set version
shared_mutex cerrno
shared_mutex cstddef
shared_mutex ctime
-shared_mutex iosfwd
shared_mutex limits
shared_mutex ratio
shared_mutex stdexcept
diff --git a/libcxx/test/libcxx/transitive_includes/cxx26.csv b/libcxx/test/libcxx/transitive_includes/cxx26.csv
index fd20632ff88986..5d68887113e895 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx26.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx26.csv
@@ -32,7 +32,6 @@ atomic cstdint
atomic cstdlib
atomic cstring
atomic ctime
-atomic iosfwd
atomic limits
atomic ratio
atomic version
@@ -40,7 +39,6 @@ barrier cstddef
barrier cstdint
barrier cstring
barrier ctime
-barrier iosfwd
barrier limits
barrier new
barrier ratio
@@ -330,7 +328,6 @@ latch cstddef
latch cstdint
latch cstring
latch ctime
-latch iosfwd
latch limits
latch ratio
latch version
@@ -427,7 +424,6 @@ numeric cstring
numeric ctime
numeric execution
numeric initializer_list
-numeric iosfwd
numeric limits
numeric new
numeric ratio
@@ -519,7 +515,6 @@ semaphore cstddef
semaphore cstdint
semaphore cstring
semaphore ctime
-semaphore iosfwd
semaphore limits
semaphore ratio
semaphore version
@@ -536,7 +531,6 @@ set version
shared_mutex cerrno
shared_mutex cstddef
shared_mutex ctime
-shared_mutex iosfwd
shared_mutex limits
shared_mutex ratio
shared_mutex stdexcept
diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp
index 60c16cdb46012e..7cc0911082f708 100644
--- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp
+++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp
@@ -18,8 +18,9 @@
// Not very portable
-#include <thread>
#include <cassert>
+#include <functional>
+#include <thread>
#include "test_macros.h"
diff --git a/libcxx/utils/data/ignore_format.txt b/libcxx/utils/data/ignore_format.txt
index f19302bb08090c..bcba849f7c30a6 100644
--- a/libcxx/utils/data/ignore_format.txt
+++ b/libcxx/utils/data/ignore_format.txt
@@ -474,6 +474,7 @@ libcxx/include/__support/xlocale/__nop_locale_mgmt.h
libcxx/include/__system_error/errc.h
libcxx/include/thread
libcxx/include/__thread/formatter.h
+libcxx/include/__thread/id.h
libcxx/include/__threading_support
libcxx/include/__thread/poll_with_backoff.h
libcxx/include/__thread/this_thread.h
More information about the libcxx-commits
mailing list