aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUILD4
-rw-r--r--CMakeLists.txt12
-rw-r--r--Makefile12
-rw-r--r--build.yaml4
-rw-r--r--gRPC-C++.podspec6
-rw-r--r--gRPC-Core.podspec6
-rw-r--r--grpc.def7
-rw-r--r--grpc.gemspec4
-rw-r--r--include/grpc/module.modulemap2
-rw-r--r--include/grpc/support/thd_id.h (renamed from src/core/lib/gpr/thd_internal.h)30
-rw-r--r--package.xml4
-rw-r--r--src/core/lib/gpr/thd.cc6
-rw-r--r--src/core/lib/gpr/thd.h (renamed from include/grpc/support/thd.h)48
-rw-r--r--src/core/lib/gpr/thd_posix.cc4
-rw-r--r--src/core/lib/gpr/thd_windows.cc4
-rw-r--r--src/core/lib/iomgr/ev_poll_posix.cc2
-rw-r--r--src/core/lib/iomgr/exec_ctx.cc2
-rw-r--r--src/core/lib/iomgr/executor.cc2
-rw-r--r--src/core/lib/iomgr/fork_posix.cc3
-rw-r--r--src/core/lib/iomgr/iocp_windows.cc2
-rw-r--r--src/core/lib/iomgr/iomgr.cc2
-rw-r--r--src/core/lib/iomgr/iomgr_uv.cc2
-rw-r--r--src/core/lib/iomgr/iomgr_uv.h2
-rw-r--r--src/core/lib/iomgr/pollset_windows.cc2
-rw-r--r--src/core/lib/iomgr/resolve_address_posix.cc2
-rw-r--r--src/core/lib/iomgr/resolve_address_windows.cc2
-rw-r--r--src/core/lib/iomgr/timer_manager.cc2
-rw-r--r--src/core/lib/iomgr/wakeup_fd_cv.cc2
-rw-r--r--src/core/lib/profiling/basic_timers.cc2
-rw-r--r--src/core/lib/surface/init.cc2
-rw-r--r--src/core/tsi/alts_transport_security.h3
-rw-r--r--src/core/tsi/ssl_transport_security.cc2
-rw-r--r--src/cpp/client/channel_cc.cc3
-rw-r--r--src/csharp/ext/grpc_csharp_ext.c4
-rw-r--r--src/ruby/ext/grpc/rb_grpc_imports.generated.c14
-rw-r--r--src/ruby/ext/grpc/rb_grpc_imports.generated.h23
-rw-r--r--test/core/bad_client/bad_client.cc2
-rw-r--r--test/core/end2end/bad_server_response_test.cc2
-rw-r--r--test/core/end2end/fixtures/h2_census.cc2
-rw-r--r--test/core/end2end/fixtures/h2_compress.cc2
-rw-r--r--test/core/end2end/fixtures/h2_full+pipe.cc2
-rw-r--r--test/core/end2end/fixtures/h2_full+trace.cc2
-rw-r--r--test/core/end2end/fixtures/h2_full+workarounds.cc2
-rw-r--r--test/core/end2end/fixtures/h2_full.cc2
-rw-r--r--test/core/end2end/fixtures/h2_http_proxy.cc2
-rw-r--r--test/core/end2end/fixtures/h2_load_reporting.cc2
-rw-r--r--test/core/end2end/fixtures/h2_proxy.cc2
-rw-r--r--test/core/end2end/fixtures/h2_sockpair+trace.cc2
-rw-r--r--test/core/end2end/fixtures/h2_sockpair.cc2
-rw-r--r--test/core/end2end/fixtures/h2_sockpair_1byte.cc2
-rw-r--r--test/core/end2end/fixtures/h2_uds.cc2
-rw-r--r--test/core/end2end/fixtures/http_proxy_fixture.cc2
-rw-r--r--test/core/end2end/fixtures/inproc.cc2
-rw-r--r--test/core/end2end/fixtures/proxy.cc2
-rw-r--r--test/core/end2end/tests/bad_ping.cc2
-rw-r--r--test/core/end2end/tests/connectivity.cc2
-rw-r--r--test/core/end2end/tests/ping.cc2
-rw-r--r--test/core/gpr/arena_test.cc2
-rw-r--r--test/core/gpr/cpu_test.cc3
-rw-r--r--test/core/gpr/mpscq_test.cc2
-rw-r--r--test/core/gpr/spinlock_test.cc3
-rw-r--r--test/core/gpr/sync_test.cc3
-rw-r--r--test/core/gpr/thd_test.cc4
-rw-r--r--test/core/gpr/time_test.cc3
-rw-r--r--test/core/gpr/tls_test.cc2
-rw-r--r--test/core/gprpp/manual_constructor_test.cc3
-rw-r--r--test/core/handshake/client_ssl.cc3
-rw-r--r--test/core/handshake/readahead_handshaker_server_ssl.cc3
-rw-r--r--test/core/handshake/server_ssl.cc3
-rw-r--r--test/core/handshake/server_ssl_common.cc3
-rw-r--r--test/core/handshake/server_ssl_common.h3
-rw-r--r--test/core/iomgr/combiner_test.cc2
-rw-r--r--test/core/iomgr/error_test.cc2
-rw-r--r--test/core/iomgr/ev_epollsig_linux_test.cc2
-rw-r--r--test/core/iomgr/resolve_address_posix_test.cc2
-rw-r--r--test/core/iomgr/wakeup_fd_cv_test.cc2
-rw-r--r--test/core/network_benchmarks/low_level_ping_pong.cc2
-rw-r--r--test/core/statistics/rpc_stats_test.cc3
-rw-r--r--test/core/surface/byte_buffer_reader_test.cc2
-rw-r--r--test/core/surface/completion_queue_threading_test.cc2
-rw-r--r--test/core/surface/concurrent_connectivity_test.cc2
-rw-r--r--test/core/surface/num_external_connectivity_watchers_test.cc2
-rw-r--r--test/core/surface/public_headers_must_be_c89.c9
-rw-r--r--test/core/surface/sequential_connectivity_test.cc2
-rw-r--r--test/core/tsi/transport_security_test_lib.cc3
-rw-r--r--test/cpp/client/client_channel_stress_test.cc2
-rw-r--r--test/cpp/cocoapods/generic/generic.mm2
-rw-r--r--test/cpp/end2end/async_end2end_test.cc2
-rw-r--r--test/cpp/end2end/client_crash_test.cc2
-rw-r--r--test/cpp/end2end/client_lb_end2end_test.cc2
-rw-r--r--test/cpp/end2end/end2end_test.cc2
-rw-r--r--test/cpp/end2end/filter_end2end_test.cc2
-rw-r--r--test/cpp/end2end/generic_end2end_test.cc2
-rw-r--r--test/cpp/end2end/grpclb_end2end_test.cc2
-rw-r--r--test/cpp/end2end/mock_test.cc2
-rw-r--r--test/cpp/end2end/server_crash_test.cc2
-rw-r--r--test/cpp/end2end/server_early_return_test.cc2
-rw-r--r--test/cpp/end2end/streaming_throughput_test.cc2
-rw-r--r--test/cpp/end2end/thread_stress_test.cc2
-rw-r--r--test/cpp/grpclb/grpclb_test.cc2
-rw-r--r--tools/doxygen/Doxyfile.c++2
-rw-r--r--tools/doxygen/Doxyfile.c++.internal4
-rw-r--r--tools/doxygen/Doxyfile.core2
-rw-r--r--tools/doxygen/Doxyfile.core.internal4
-rw-r--r--tools/run_tests/generated/sources_and_headers.json8
105 files changed, 188 insertions, 214 deletions
diff --git a/BUILD b/BUILD
index 561993a573..1c03b7dad3 100644
--- a/BUILD
+++ b/BUILD
@@ -76,7 +76,7 @@ GPR_PUBLIC_HDRS = [
"include/grpc/support/sync_generic.h",
"include/grpc/support/sync_posix.h",
"include/grpc/support/sync_windows.h",
- "include/grpc/support/thd.h",
+ "include/grpc/support/thd_id.h",
"include/grpc/support/time.h",
]
@@ -494,7 +494,7 @@ grpc_cc_library(
"src/core/lib/gpr/spinlock.h",
"src/core/lib/gpr/string.h",
"src/core/lib/gpr/string_windows.h",
- "src/core/lib/gpr/thd_internal.h",
+ "src/core/lib/gpr/thd.h",
"src/core/lib/gpr/time_precise.h",
"src/core/lib/gpr/tls.h",
"src/core/lib/gpr/tls_gcc.h",
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e2412c4e7..2f2a51b5e2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -711,7 +711,7 @@ foreach(_hdr
include/grpc/support/sync_generic.h
include/grpc/support/sync_posix.h
include/grpc/support/sync_windows.h
- include/grpc/support/thd.h
+ include/grpc/support/thd_id.h
include/grpc/support/time.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
@@ -1679,7 +1679,7 @@ foreach(_hdr
include/grpc/support/sync_generic.h
include/grpc/support/sync_posix.h
include/grpc/support/sync_windows.h
- include/grpc/support/thd.h
+ include/grpc/support/thd_id.h
include/grpc/support/time.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
@@ -1966,7 +1966,7 @@ foreach(_hdr
include/grpc/support/sync_generic.h
include/grpc/support/sync_posix.h
include/grpc/support/sync_windows.h
- include/grpc/support/thd.h
+ include/grpc/support/thd_id.h
include/grpc/support/time.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
@@ -2525,7 +2525,7 @@ foreach(_hdr
include/grpc/support/sync_generic.h
include/grpc/support/sync_posix.h
include/grpc/support/sync_windows.h
- include/grpc/support/thd.h
+ include/grpc/support/thd_id.h
include/grpc/support/time.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
@@ -2989,7 +2989,7 @@ foreach(_hdr
include/grpc/support/sync_generic.h
include/grpc/support/sync_posix.h
include/grpc/support/sync_windows.h
- include/grpc/support/thd.h
+ include/grpc/support/thd_id.h
include/grpc/support/time.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
@@ -3710,7 +3710,7 @@ foreach(_hdr
include/grpc/support/sync_generic.h
include/grpc/support/sync_posix.h
include/grpc/support/sync_windows.h
- include/grpc/support/thd.h
+ include/grpc/support/thd_id.h
include/grpc/support/time.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
diff --git a/Makefile b/Makefile
index d1bc514cc6..3e5a1a6fc6 100644
--- a/Makefile
+++ b/Makefile
@@ -2935,7 +2935,7 @@ PUBLIC_HEADERS_C += \
include/grpc/support/sync_generic.h \
include/grpc/support/sync_posix.h \
include/grpc/support/sync_windows.h \
- include/grpc/support/thd.h \
+ include/grpc/support/thd_id.h \
include/grpc/support/time.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
@@ -3884,7 +3884,7 @@ PUBLIC_HEADERS_C += \
include/grpc/support/sync_generic.h \
include/grpc/support/sync_posix.h \
include/grpc/support/sync_windows.h \
- include/grpc/support/thd.h \
+ include/grpc/support/thd_id.h \
include/grpc/support/time.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
@@ -4164,7 +4164,7 @@ PUBLIC_HEADERS_C += \
include/grpc/support/sync_generic.h \
include/grpc/support/sync_posix.h \
include/grpc/support/sync_windows.h \
- include/grpc/support/thd.h \
+ include/grpc/support/thd_id.h \
include/grpc/support/time.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
@@ -4687,7 +4687,7 @@ PUBLIC_HEADERS_CXX += \
include/grpc/support/sync_generic.h \
include/grpc/support/sync_posix.h \
include/grpc/support/sync_windows.h \
- include/grpc/support/thd.h \
+ include/grpc/support/thd_id.h \
include/grpc/support/time.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
@@ -5164,7 +5164,7 @@ PUBLIC_HEADERS_CXX += \
include/grpc/support/sync_generic.h \
include/grpc/support/sync_posix.h \
include/grpc/support/sync_windows.h \
- include/grpc/support/thd.h \
+ include/grpc/support/thd_id.h \
include/grpc/support/time.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
@@ -5874,7 +5874,7 @@ PUBLIC_HEADERS_CXX += \
include/grpc/support/sync_generic.h \
include/grpc/support/sync_posix.h \
include/grpc/support/sync_windows.h \
- include/grpc/support/thd.h \
+ include/grpc/support/thd_id.h \
include/grpc/support/time.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
diff --git a/build.yaml b/build.yaml
index a0f312ae11..3bf07d72eb 100644
--- a/build.yaml
+++ b/build.yaml
@@ -92,7 +92,7 @@ filegroups:
- include/grpc/support/sync_generic.h
- include/grpc/support/sync_posix.h
- include/grpc/support/sync_windows.h
- - include/grpc/support/thd.h
+ - include/grpc/support/thd_id.h
- include/grpc/support/time.h
headers:
- src/core/lib/gpr/arena.h
@@ -104,7 +104,7 @@ filegroups:
- src/core/lib/gpr/spinlock.h
- src/core/lib/gpr/string.h
- src/core/lib/gpr/string_windows.h
- - src/core/lib/gpr/thd_internal.h
+ - src/core/lib/gpr/thd.h
- src/core/lib/gpr/time_precise.h
- src/core/lib/gpr/tls.h
- src/core/lib/gpr/tls_gcc.h
diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec
index 5bd3b0ba93..2f1f6bdc0a 100644
--- a/gRPC-C++.podspec
+++ b/gRPC-C++.podspec
@@ -212,7 +212,7 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/spinlock.h',
'src/core/lib/gpr/string.h',
'src/core/lib/gpr/string_windows.h',
- 'src/core/lib/gpr/thd_internal.h',
+ 'src/core/lib/gpr/thd.h',
'src/core/lib/gpr/time_precise.h',
'src/core/lib/gpr/tls.h',
'src/core/lib/gpr/tls_gcc.h',
@@ -464,7 +464,7 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/spinlock.h',
'src/core/lib/gpr/string.h',
'src/core/lib/gpr/string_windows.h',
- 'src/core/lib/gpr/thd_internal.h',
+ 'src/core/lib/gpr/thd.h',
'src/core/lib/gpr/time_precise.h',
'src/core/lib/gpr/tls.h',
'src/core/lib/gpr/tls_gcc.h',
@@ -654,7 +654,7 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/spinlock.h',
'src/core/lib/gpr/string.h',
'src/core/lib/gpr/string_windows.h',
- 'src/core/lib/gpr/thd_internal.h',
+ 'src/core/lib/gpr/thd.h',
'src/core/lib/gpr/time_precise.h',
'src/core/lib/gpr/tls.h',
'src/core/lib/gpr/tls_gcc.h',
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index 1798a0cbf0..95db0d8e7d 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -124,7 +124,7 @@ Pod::Spec.new do |s|
'include/grpc/support/sync_generic.h',
'include/grpc/support/sync_posix.h',
'include/grpc/support/sync_windows.h',
- 'include/grpc/support/thd.h',
+ 'include/grpc/support/thd_id.h',
'include/grpc/support/time.h',
'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h',
@@ -192,7 +192,7 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/spinlock.h',
'src/core/lib/gpr/string.h',
'src/core/lib/gpr/string_windows.h',
- 'src/core/lib/gpr/thd_internal.h',
+ 'src/core/lib/gpr/thd.h',
'src/core/lib/gpr/time_precise.h',
'src/core/lib/gpr/tls.h',
'src/core/lib/gpr/tls_gcc.h',
@@ -721,7 +721,7 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/spinlock.h',
'src/core/lib/gpr/string.h',
'src/core/lib/gpr/string_windows.h',
- 'src/core/lib/gpr/thd_internal.h',
+ 'src/core/lib/gpr/thd.h',
'src/core/lib/gpr/time_precise.h',
'src/core/lib/gpr/tls.h',
'src/core/lib/gpr/tls_gcc.h',
diff --git a/grpc.def b/grpc.def
index 8a6210253a..2bafebbbd4 100644
--- a/grpc.def
+++ b/grpc.def
@@ -211,14 +211,7 @@ EXPORTS
gpr_stats_init
gpr_stats_inc
gpr_stats_read
- gpr_thd_new
- gpr_thd_options_default
- gpr_thd_options_set_detached
- gpr_thd_options_set_joinable
- gpr_thd_options_is_detached
- gpr_thd_options_is_joinable
gpr_thd_currentid
- gpr_thd_join
gpr_time_0
gpr_inf_future
gpr_inf_past
diff --git a/grpc.gemspec b/grpc.gemspec
index 6e5170334e..ac901da0fe 100644
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -59,7 +59,7 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/support/sync_generic.h )
s.files += %w( include/grpc/support/sync_posix.h )
s.files += %w( include/grpc/support/sync_windows.h )
- s.files += %w( include/grpc/support/thd.h )
+ s.files += %w( include/grpc/support/thd_id.h )
s.files += %w( include/grpc/support/time.h )
s.files += %w( include/grpc/impl/codegen/atm.h )
s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h )
@@ -83,7 +83,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/gpr/spinlock.h )
s.files += %w( src/core/lib/gpr/string.h )
s.files += %w( src/core/lib/gpr/string_windows.h )
- s.files += %w( src/core/lib/gpr/thd_internal.h )
+ s.files += %w( src/core/lib/gpr/thd.h )
s.files += %w( src/core/lib/gpr/time_precise.h )
s.files += %w( src/core/lib/gpr/tls.h )
s.files += %w( src/core/lib/gpr/tls_gcc.h )
diff --git a/include/grpc/module.modulemap b/include/grpc/module.modulemap
index e5dac828b1..e0d5404e8a 100644
--- a/include/grpc/module.modulemap
+++ b/include/grpc/module.modulemap
@@ -11,7 +11,7 @@ framework module grpc {
header "support/string_util.h"
header "support/sync.h"
header "support/sync_generic.h"
- header "support/thd.h"
+ header "support/thd_id.h"
header "support/time.h"
header "impl/codegen/atm.h"
header "impl/codegen/fork.h"
diff --git a/src/core/lib/gpr/thd_internal.h b/include/grpc/support/thd_id.h
index 692c00c8e1..ffd1f6e219 100644
--- a/src/core/lib/gpr/thd_internal.h
+++ b/include/grpc/support/thd_id.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,15 +16,27 @@
*
*/
-#ifndef GRPC_CORE_LIB_GPR_THD_INTERNAL_H
-#define GRPC_CORE_LIB_GPR_THD_INTERNAL_H
+#ifndef GRPC_SUPPORT_THD_ID_H
+#define GRPC_SUPPORT_THD_ID_H
+/** Thread interface for GPR.
-#include <grpc/support/time.h>
+ Types
+ gpr_thd_id a unique opaque identifier for a thread.
+ */
+
+#include <grpc/support/port_platform.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef uintptr_t gpr_thd_id;
-/* Internal interfaces between modules within the gpr support library. */
-void gpr_thd_init();
+/** Returns the identifier of the current thread. */
+GPRAPI gpr_thd_id gpr_thd_currentid(void);
-/* Wait for all outstanding threads to finish, up to deadline */
-int gpr_await_threads(gpr_timespec deadline);
+#ifdef __cplusplus
+}
+#endif
-#endif /* GRPC_CORE_LIB_GPR_THD_INTERNAL_H */
+#endif /* GRPC_SUPPORT_THD_ID_H */
diff --git a/package.xml b/package.xml
index 5b598c17ec..5575855648 100644
--- a/package.xml
+++ b/package.xml
@@ -66,7 +66,7 @@
<file baseinstalldir="/" name="include/grpc/support/sync_generic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/sync_posix.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/sync_windows.h" role="src" />
- <file baseinstalldir="/" name="include/grpc/support/thd.h" role="src" />
+ <file baseinstalldir="/" name="include/grpc/support/thd_id.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/time.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_atomic.h" role="src" />
@@ -90,7 +90,7 @@
<file baseinstalldir="/" name="src/core/lib/gpr/spinlock.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/string.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/string_windows.h" role="src" />
- <file baseinstalldir="/" name="src/core/lib/gpr/thd_internal.h" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/gpr/thd.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/time_precise.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/tls.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/tls_gcc.h" role="src" />
diff --git a/src/core/lib/gpr/thd.cc b/src/core/lib/gpr/thd.cc
index ca62615d65..11391418b1 100644
--- a/src/core/lib/gpr/thd.cc
+++ b/src/core/lib/gpr/thd.cc
@@ -16,11 +16,11 @@
*
*/
-/* Posix implementation for gpr threads. */
+/* Platform-independent features for gpr threads. */
-#include <string.h>
+#include "src/core/lib/gpr/thd.h"
-#include <grpc/support/thd.h>
+#include <string.h>
enum { GPR_THD_JOINABLE = 1 };
diff --git a/include/grpc/support/thd.h b/src/core/lib/gpr/thd.h
index e9444e88c9..58ce0d0088 100644
--- a/include/grpc/support/thd.h
+++ b/src/core/lib/gpr/thd.h
@@ -16,24 +16,17 @@
*
*/
-#ifndef GRPC_SUPPORT_THD_H
-#define GRPC_SUPPORT_THD_H
-/** Thread interface for GPR.
+#ifndef GRPC_CORE_LIB_GPR_THD_H
+#define GRPC_CORE_LIB_GPR_THD_H
+/** Internal thread interface for GPR.
Types
- gpr_thd_id a thread identifier.
- (Currently no calls take a thread identifier.
- It exists for future extensibility.)
gpr_thd_options options used when creating a thread
*/
#include <grpc/support/port_platform.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef uintptr_t gpr_thd_id;
+#include <grpc/support/thd_id.h>
+#include <grpc/support/time.h>
/** Thread creation options. */
typedef struct {
@@ -46,34 +39,33 @@ typedef struct {
that support thread naming.
If options==NULL, default options are used.
The thread is immediately runnable, and exits when (*thd_body)() returns. */
-GPRAPI int gpr_thd_new(gpr_thd_id* t, const char* thd_name,
- void (*thd_body)(void* arg), void* arg,
- const gpr_thd_options* options);
+int gpr_thd_new(gpr_thd_id* t, const char* thd_name,
+ void (*thd_body)(void* arg), void* arg,
+ const gpr_thd_options* options);
/** Return a gpr_thd_options struct with all fields set to defaults. */
-GPRAPI gpr_thd_options gpr_thd_options_default(void);
+gpr_thd_options gpr_thd_options_default(void);
/** Set the thread to become detached on startup - this is the default. */
-GPRAPI void gpr_thd_options_set_detached(gpr_thd_options* options);
+void gpr_thd_options_set_detached(gpr_thd_options* options);
/** Set the thread to become joinable - mutually exclusive with detached. */
-GPRAPI void gpr_thd_options_set_joinable(gpr_thd_options* options);
+void gpr_thd_options_set_joinable(gpr_thd_options* options);
/** Returns non-zero if the option detached is set. */
-GPRAPI int gpr_thd_options_is_detached(const gpr_thd_options* options);
+int gpr_thd_options_is_detached(const gpr_thd_options* options);
/** Returns non-zero if the option joinable is set. */
-GPRAPI int gpr_thd_options_is_joinable(const gpr_thd_options* options);
-
-/** Returns the identifier of the current thread. */
-GPRAPI gpr_thd_id gpr_thd_currentid(void);
+int gpr_thd_options_is_joinable(const gpr_thd_options* options);
/** Blocks until the specified thread properly terminates.
Calling this on a detached thread has unpredictable results. */
-GPRAPI void gpr_thd_join(gpr_thd_id t);
+void gpr_thd_join(gpr_thd_id t);
+
+/* Internal interfaces between modules within the gpr support library. */
+void gpr_thd_init();
-#ifdef __cplusplus
-}
-#endif
+/* Wait for all outstanding threads to finish, up to deadline */
+int gpr_await_threads(gpr_timespec deadline);
-#endif /* GRPC_SUPPORT_THD_H */
+#endif /* GRPC_CORE_LIB_GPR_THD_H */
diff --git a/src/core/lib/gpr/thd_posix.cc b/src/core/lib/gpr/thd_posix.cc
index e8730b9c66..fcd174bfba 100644
--- a/src/core/lib/gpr/thd_posix.cc
+++ b/src/core/lib/gpr/thd_posix.cc
@@ -22,10 +22,12 @@
#ifdef GPR_POSIX_SYNC
+#include "src/core/lib/gpr/thd.h"
+
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
+#include <grpc/support/thd_id.h>
#include <pthread.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/core/lib/gpr/thd_windows.cc b/src/core/lib/gpr/thd_windows.cc
index f920770f32..b467bd2662 100644
--- a/src/core/lib/gpr/thd_windows.cc
+++ b/src/core/lib/gpr/thd_windows.cc
@@ -22,9 +22,11 @@
#ifdef GPR_WINDOWS
+#include "src/core/lib/gpr/thd.h"
+
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
+#include <grpc/support/thd_id.h>
#include <string.h>
#if defined(_MSC_VER)
diff --git a/src/core/lib/iomgr/ev_poll_posix.cc b/src/core/lib/iomgr/ev_poll_posix.cc
index e92163322f..e630ddf8e0 100644
--- a/src/core/lib/iomgr/ev_poll_posix.cc
+++ b/src/core/lib/iomgr/ev_poll_posix.cc
@@ -33,10 +33,10 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
-#include <grpc/support/thd.h>
#include "src/core/lib/debug/stats.h"
#include "src/core/lib/gpr/murmur_hash.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/tls.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/iomgr/block_annotate.h"
diff --git a/src/core/lib/iomgr/exec_ctx.cc b/src/core/lib/iomgr/exec_ctx.cc
index 5401a94dd3..1a2284f474 100644
--- a/src/core/lib/iomgr/exec_ctx.cc
+++ b/src/core/lib/iomgr/exec_ctx.cc
@@ -20,8 +20,8 @@
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/combiner.h"
#include "src/core/lib/profiling/timers.h"
diff --git a/src/core/lib/iomgr/executor.cc b/src/core/lib/iomgr/executor.cc
index 7ab987c19e..d2a050919e 100644
--- a/src/core/lib/iomgr/executor.cc
+++ b/src/core/lib/iomgr/executor.cc
@@ -24,10 +24,10 @@
#include <grpc/support/cpu.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/lib/debug/stats.h"
#include "src/core/lib/gpr/spinlock.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/tls.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/iomgr/exec_ctx.h"
diff --git a/src/core/lib/iomgr/fork_posix.cc b/src/core/lib/iomgr/fork_posix.cc
index c581dae1ae..c9a65c5702 100644
--- a/src/core/lib/iomgr/fork_posix.cc
+++ b/src/core/lib/iomgr/fork_posix.cc
@@ -24,11 +24,10 @@
#include <grpc/fork.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/fork.h"
-#include "src/core/lib/gpr/thd_internal.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/ev_posix.h"
#include "src/core/lib/iomgr/executor.h"
#include "src/core/lib/iomgr/timer_manager.h"
diff --git a/src/core/lib/iomgr/iocp_windows.cc b/src/core/lib/iomgr/iocp_windows.cc
index d730ce4624..4716872ce4 100644
--- a/src/core/lib/iomgr/iocp_windows.cc
+++ b/src/core/lib/iomgr/iocp_windows.cc
@@ -26,9 +26,9 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/log_windows.h>
-#include <grpc/support/thd.h>
#include "src/core/lib/debug/stats.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/iocp_windows.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
#include "src/core/lib/iomgr/socket_windows.h"
diff --git a/src/core/lib/iomgr/iomgr.cc b/src/core/lib/iomgr/iomgr.cc
index 9e407a29a8..70a80e1998 100644
--- a/src/core/lib/iomgr/iomgr.cc
+++ b/src/core/lib/iomgr/iomgr.cc
@@ -28,10 +28,10 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/executor.h"
diff --git a/src/core/lib/iomgr/iomgr_uv.cc b/src/core/lib/iomgr/iomgr_uv.cc
index 9614c2e664..c11bc28ad7 100644
--- a/src/core/lib/iomgr/iomgr_uv.cc
+++ b/src/core/lib/iomgr/iomgr_uv.cc
@@ -20,6 +20,8 @@
#ifdef GRPC_UV
+#include <grpc/support/thd_id.h>
+
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/iomgr/executor.h"
#include "src/core/lib/iomgr/iomgr_uv.h"
diff --git a/src/core/lib/iomgr/iomgr_uv.h b/src/core/lib/iomgr/iomgr_uv.h
index 3b4daaa73b..a382f0a5ae 100644
--- a/src/core/lib/iomgr/iomgr_uv.h
+++ b/src/core/lib/iomgr/iomgr_uv.h
@@ -21,7 +21,7 @@
#include "src/core/lib/iomgr/iomgr_internal.h"
-#include <grpc/support/thd.h>
+#include <grpc/support/thd_id.h>
/* The thread ID of the thread on which grpc was initialized. Used to verify
* that all calls into libuv are made on that same thread */
diff --git a/src/core/lib/iomgr/pollset_windows.cc b/src/core/lib/iomgr/pollset_windows.cc
index 6ef949aad7..240a24dee1 100644
--- a/src/core/lib/iomgr/pollset_windows.cc
+++ b/src/core/lib/iomgr/pollset_windows.cc
@@ -21,8 +21,8 @@
#ifdef GRPC_WINSOCK_SOCKET
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/iocp_windows.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
#include "src/core/lib/iomgr/pollset.h"
diff --git a/src/core/lib/iomgr/resolve_address_posix.cc b/src/core/lib/iomgr/resolve_address_posix.cc
index dd5363dc0a..3dc1d871a1 100644
--- a/src/core/lib/iomgr/resolve_address_posix.cc
+++ b/src/core/lib/iomgr/resolve_address_posix.cc
@@ -29,11 +29,11 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/executor.h"
diff --git a/src/core/lib/iomgr/resolve_address_windows.cc b/src/core/lib/iomgr/resolve_address_windows.cc
index e875d77fd8..8f4fd04402 100644
--- a/src/core/lib/iomgr/resolve_address_windows.cc
+++ b/src/core/lib/iomgr/resolve_address_windows.cc
@@ -31,11 +31,11 @@
#include <grpc/support/log.h>
#include <grpc/support/log_windows.h>
#include <grpc/support/string_util.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/executor.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
diff --git a/src/core/lib/iomgr/timer_manager.cc b/src/core/lib/iomgr/timer_manager.cc
index a528c22264..94e7953fde 100644
--- a/src/core/lib/iomgr/timer_manager.cc
+++ b/src/core/lib/iomgr/timer_manager.cc
@@ -21,11 +21,11 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
-#include <grpc/support/thd.h>
#include <inttypes.h>
#include "src/core/lib/debug/trace.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/timer.h"
typedef struct completed_thread {
diff --git a/src/core/lib/iomgr/wakeup_fd_cv.cc b/src/core/lib/iomgr/wakeup_fd_cv.cc
index 59718243e0..41d35cb1fd 100644
--- a/src/core/lib/iomgr/wakeup_fd_cv.cc
+++ b/src/core/lib/iomgr/wakeup_fd_cv.cc
@@ -28,9 +28,9 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/useful.h"
#define MAX_TABLE_RESIZE 256
diff --git a/src/core/lib/profiling/basic_timers.cc b/src/core/lib/profiling/basic_timers.cc
index d1c9fd7dec..ca6705a6b3 100644
--- a/src/core/lib/profiling/basic_timers.cc
+++ b/src/core/lib/profiling/basic_timers.cc
@@ -25,12 +25,12 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include <stdio.h>
#include <string.h>
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/thd.h"
typedef enum { BEGIN = '{', END = '}', MARK = '.' } marker_type;
diff --git a/src/core/lib/surface/init.cc b/src/core/lib/surface/init.cc
index 46bf266740..7bc24a5049 100644
--- a/src/core/lib/surface/init.cc
+++ b/src/core/lib/surface/init.cc
@@ -32,7 +32,7 @@
#include "src/core/lib/debug/stats.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gpr/fork.h"
-#include "src/core/lib/gpr/thd_internal.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/http/parser.h"
#include "src/core/lib/iomgr/call_combiner.h"
#include "src/core/lib/iomgr/combiner.h"
diff --git a/src/core/tsi/alts_transport_security.h b/src/core/tsi/alts_transport_security.h
index 5d693d04af..37febd1e28 100644
--- a/src/core/tsi/alts_transport_security.h
+++ b/src/core/tsi/alts_transport_security.h
@@ -21,7 +21,8 @@
#include <grpc/grpc.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
+
+#include "src/core/lib/gpr/thd.h"
typedef struct alts_shared_resource {
gpr_thd_id thread_id;
diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc
index 643b5a5c79..29fd59a0e9 100644
--- a/src/core/tsi/ssl_transport_security.cc
+++ b/src/core/tsi/ssl_transport_security.cc
@@ -36,7 +36,7 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
+#include <grpc/support/thd_id.h>
extern "C" {
#include <openssl/bio.h>
diff --git a/src/cpp/client/channel_cc.cc b/src/cpp/client/channel_cc.cc
index e4ed3490fd..dcfac2a6c5 100644
--- a/src/cpp/client/channel_cc.cc
+++ b/src/cpp/client/channel_cc.cc
@@ -39,10 +39,11 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/profiling/timers.h"
namespace grpc {
diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c
index eb69b5829c..3e6ec474b7 100644
--- a/src/csharp/ext/grpc_csharp_ext.c
+++ b/src/csharp/ext/grpc_csharp_ext.c
@@ -16,8 +16,6 @@
*
*/
-#include "src/core/lib/gpr/string.h"
-
#include <grpc/byte_buffer_reader.h>
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
@@ -26,7 +24,7 @@
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/string_util.h>
-#include <grpc/support/thd.h>
+#include <grpc/support/thd_id.h>
#include <string.h>
diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c
index 38e085ef25..c045480ff4 100644
--- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c
+++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c
@@ -234,14 +234,7 @@ gpr_ref_is_unique_type gpr_ref_is_unique_import;
gpr_stats_init_type gpr_stats_init_import;
gpr_stats_inc_type gpr_stats_inc_import;
gpr_stats_read_type gpr_stats_read_import;
-gpr_thd_new_type gpr_thd_new_import;
-gpr_thd_options_default_type gpr_thd_options_default_import;
-gpr_thd_options_set_detached_type gpr_thd_options_set_detached_import;
-gpr_thd_options_set_joinable_type gpr_thd_options_set_joinable_import;
-gpr_thd_options_is_detached_type gpr_thd_options_is_detached_import;
-gpr_thd_options_is_joinable_type gpr_thd_options_is_joinable_import;
gpr_thd_currentid_type gpr_thd_currentid_import;
-gpr_thd_join_type gpr_thd_join_import;
gpr_time_0_type gpr_time_0_import;
gpr_inf_future_type gpr_inf_future_import;
gpr_inf_past_type gpr_inf_past_import;
@@ -477,14 +470,7 @@ void grpc_rb_load_imports(HMODULE library) {
gpr_stats_init_import = (gpr_stats_init_type) GetProcAddress(library, "gpr_stats_init");
gpr_stats_inc_import = (gpr_stats_inc_type) GetProcAddress(library, "gpr_stats_inc");
gpr_stats_read_import = (gpr_stats_read_type) GetProcAddress(library, "gpr_stats_read");
- gpr_thd_new_import = (gpr_thd_new_type) GetProcAddress(library, "gpr_thd_new");
- gpr_thd_options_default_import = (gpr_thd_options_default_type) GetProcAddress(library, "gpr_thd_options_default");
- gpr_thd_options_set_detached_import = (gpr_thd_options_set_detached_type) GetProcAddress(library, "gpr_thd_options_set_detached");
- gpr_thd_options_set_joinable_import = (gpr_thd_options_set_joinable_type) GetProcAddress(library, "gpr_thd_options_set_joinable");
- gpr_thd_options_is_detached_import = (gpr_thd_options_is_detached_type) GetProcAddress(library, "gpr_thd_options_is_detached");
- gpr_thd_options_is_joinable_import = (gpr_thd_options_is_joinable_type) GetProcAddress(library, "gpr_thd_options_is_joinable");
gpr_thd_currentid_import = (gpr_thd_currentid_type) GetProcAddress(library, "gpr_thd_currentid");
- gpr_thd_join_import = (gpr_thd_join_type) GetProcAddress(library, "gpr_thd_join");
gpr_time_0_import = (gpr_time_0_type) GetProcAddress(library, "gpr_time_0");
gpr_inf_future_import = (gpr_inf_future_type) GetProcAddress(library, "gpr_inf_future");
gpr_inf_past_import = (gpr_inf_past_type) GetProcAddress(library, "gpr_inf_past");
diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h
index 9eb0a3f372..4f07452c68 100644
--- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h
+++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h
@@ -38,7 +38,7 @@
#include <grpc/support/log_windows.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
+#include <grpc/support/thd_id.h>
#include <grpc/support/time.h>
typedef int(*grpc_compression_algorithm_is_message_type)(grpc_compression_algorithm algorithm);
@@ -677,30 +677,9 @@ extern gpr_stats_inc_type gpr_stats_inc_import;
typedef intptr_t(*gpr_stats_read_type)(const gpr_stats_counter* c);
extern gpr_stats_read_type gpr_stats_read_import;
#define gpr_stats_read gpr_stats_read_import
-typedef int(*gpr_thd_new_type)(gpr_thd_id* t, const char* thd_name, void (*thd_body)(void* arg), void* arg, const gpr_thd_options* options);
-extern gpr_thd_new_type gpr_thd_new_import;
-#define gpr_thd_new gpr_thd_new_import
-typedef gpr_thd_options(*gpr_thd_options_default_type)(void);
-extern gpr_thd_options_default_type gpr_thd_options_default_import;
-#define gpr_thd_options_default gpr_thd_options_default_import
-typedef void(*gpr_thd_options_set_detached_type)(gpr_thd_options* options);
-extern gpr_thd_options_set_detached_type gpr_thd_options_set_detached_import;
-#define gpr_thd_options_set_detached gpr_thd_options_set_detached_import
-typedef void(*gpr_thd_options_set_joinable_type)(gpr_thd_options* options);
-extern gpr_thd_options_set_joinable_type gpr_thd_options_set_joinable_import;
-#define gpr_thd_options_set_joinable gpr_thd_options_set_joinable_import
-typedef int(*gpr_thd_options_is_detached_type)(const gpr_thd_options* options);
-extern gpr_thd_options_is_detached_type gpr_thd_options_is_detached_import;
-#define gpr_thd_options_is_detached gpr_thd_options_is_detached_import
-typedef int(*gpr_thd_options_is_joinable_type)(const gpr_thd_options* options);
-extern gpr_thd_options_is_joinable_type gpr_thd_options_is_joinable_import;
-#define gpr_thd_options_is_joinable gpr_thd_options_is_joinable_import
typedef gpr_thd_id(*gpr_thd_currentid_type)(void);
extern gpr_thd_currentid_type gpr_thd_currentid_import;
#define gpr_thd_currentid gpr_thd_currentid_import
-typedef void(*gpr_thd_join_type)(gpr_thd_id t);
-extern gpr_thd_join_type gpr_thd_join_import;
-#define gpr_thd_join gpr_thd_join_import
typedef gpr_timespec(*gpr_time_0_type)(gpr_clock_type type);
extern gpr_time_0_type gpr_time_0_import;
#define gpr_time_0 gpr_time_0_import
diff --git a/test/core/bad_client/bad_client.cc b/test/core/bad_client/bad_client.cc
index ee55a95e4e..6055ccbf4b 100644
--- a/test/core/bad_client/bad_client.cc
+++ b/test/core/bad_client/bad_client.cc
@@ -23,13 +23,13 @@
#include <grpc/support/alloc.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/gpr/murmur_hash.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/endpoint_pair.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/surface/completion_queue.h"
diff --git a/test/core/end2end/bad_server_response_test.cc b/test/core/end2end/bad_server_response_test.cc
index 79331bca6f..1af168e1f9 100644
--- a/test/core/end2end/bad_server_response_test.cc
+++ b/test/core/end2end/bad_server_response_test.cc
@@ -28,10 +28,10 @@
#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
diff --git a/test/core/end2end/fixtures/h2_census.cc b/test/core/end2end/fixtures/h2_census.cc
index 423764ad07..27b897ce5a 100644
--- a/test/core/end2end/fixtures/h2_census.cc
+++ b/test/core/end2end/fixtures/h2_census.cc
@@ -23,7 +23,6 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
@@ -31,6 +30,7 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/gpr/host_port.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/fixtures/h2_compress.cc b/test/core/end2end/fixtures/h2_compress.cc
index af7ddecd00..b4ec78d710 100644
--- a/test/core/end2end/fixtures/h2_compress.cc
+++ b/test/core/end2end/fixtures/h2_compress.cc
@@ -23,7 +23,6 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
@@ -31,6 +30,7 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/gpr/host_port.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/fixtures/h2_full+pipe.cc b/test/core/end2end/fixtures/h2_full+pipe.cc
index 88f24b937c..e97d078d9c 100644
--- a/test/core/end2end/fixtures/h2_full+pipe.cc
+++ b/test/core/end2end/fixtures/h2_full+pipe.cc
@@ -28,13 +28,13 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/gpr/host_port.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
diff --git a/test/core/end2end/fixtures/h2_full+trace.cc b/test/core/end2end/fixtures/h2_full+trace.cc
index 4e0d66896b..12aa69bb17 100644
--- a/test/core/end2end/fixtures/h2_full+trace.cc
+++ b/test/core/end2end/fixtures/h2_full+trace.cc
@@ -28,7 +28,6 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
@@ -36,6 +35,7 @@
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/host_port.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/fixtures/h2_full+workarounds.cc b/test/core/end2end/fixtures/h2_full+workarounds.cc
index ce0fed6fee..c6b358dcc5 100644
--- a/test/core/end2end/fixtures/h2_full+workarounds.cc
+++ b/test/core/end2end/fixtures/h2_full+workarounds.cc
@@ -23,7 +23,6 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <grpc/support/workaround_list.h>
@@ -32,6 +31,7 @@
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/gpr/host_port.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/fixtures/h2_full.cc b/test/core/end2end/fixtures/h2_full.cc
index 4b96fa268a..32e3e55128 100644
--- a/test/core/end2end/fixtures/h2_full.cc
+++ b/test/core/end2end/fixtures/h2_full.cc
@@ -23,13 +23,13 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/gpr/host_port.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/fixtures/h2_http_proxy.cc b/test/core/end2end/fixtures/h2_http_proxy.cc
index da63f46018..017682f4c7 100644
--- a/test/core/end2end/fixtures/h2_http_proxy.cc
+++ b/test/core/end2end/fixtures/h2_http_proxy.cc
@@ -24,7 +24,6 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
@@ -32,6 +31,7 @@
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/host_port.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/end2end/fixtures/http_proxy_fixture.h"
diff --git a/test/core/end2end/fixtures/h2_load_reporting.cc b/test/core/end2end/fixtures/h2_load_reporting.cc
index dddeef5862..6adc0c154e 100644
--- a/test/core/end2end/fixtures/h2_load_reporting.cc
+++ b/test/core/end2end/fixtures/h2_load_reporting.cc
@@ -23,7 +23,6 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
@@ -32,6 +31,7 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/gpr/host_port.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/fixtures/h2_proxy.cc b/test/core/end2end/fixtures/h2_proxy.cc
index 4379cddf77..93dde4f4a2 100644
--- a/test/core/end2end/fixtures/h2_proxy.cc
+++ b/test/core/end2end/fixtures/h2_proxy.cc
@@ -23,13 +23,13 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/gpr/host_port.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/end2end/fixtures/proxy.h"
diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.cc b/test/core/end2end/fixtures/h2_sockpair+trace.cc
index 92b9a463c1..5dd5c2ad67 100644
--- a/test/core/end2end/fixtures/h2_sockpair+trace.cc
+++ b/test/core/end2end/fixtures/h2_sockpair+trace.cc
@@ -28,7 +28,6 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/client/http_client_filter.h"
@@ -37,6 +36,7 @@
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/endpoint_pair.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "src/core/lib/surface/channel.h"
diff --git a/test/core/end2end/fixtures/h2_sockpair.cc b/test/core/end2end/fixtures/h2_sockpair.cc
index 46acf1f615..52a7b95c3a 100644
--- a/test/core/end2end/fixtures/h2_sockpair.cc
+++ b/test/core/end2end/fixtures/h2_sockpair.cc
@@ -23,7 +23,6 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/client/http_client_filter.h"
@@ -31,6 +30,7 @@
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/connected_channel.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/endpoint_pair.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "src/core/lib/surface/channel.h"
diff --git a/test/core/end2end/fixtures/h2_sockpair_1byte.cc b/test/core/end2end/fixtures/h2_sockpair_1byte.cc
index 6499c90271..0d3cb34724 100644
--- a/test/core/end2end/fixtures/h2_sockpair_1byte.cc
+++ b/test/core/end2end/fixtures/h2_sockpair_1byte.cc
@@ -23,7 +23,6 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/client/http_client_filter.h"
@@ -31,6 +30,7 @@
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/connected_channel.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/endpoint_pair.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "src/core/lib/surface/channel.h"
diff --git a/test/core/end2end/fixtures/h2_uds.cc b/test/core/end2end/fixtures/h2_uds.cc
index 41045c278c..a97b14f1d6 100644
--- a/test/core/end2end/fixtures/h2_uds.cc
+++ b/test/core/end2end/fixtures/h2_uds.cc
@@ -26,7 +26,6 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
@@ -34,6 +33,7 @@
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc
index 63a15753a4..289843e737 100644
--- a/test/core/end2end/fixtures/http_proxy_fixture.cc
+++ b/test/core/end2end/fixtures/http_proxy_fixture.cc
@@ -29,11 +29,11 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/http/parser.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/combiner.h"
diff --git a/test/core/end2end/fixtures/inproc.cc b/test/core/end2end/fixtures/inproc.cc
index 796ef67ddb..4ddcc78495 100644
--- a/test/core/end2end/fixtures/inproc.cc
+++ b/test/core/end2end/fixtures/inproc.cc
@@ -23,13 +23,13 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/inproc/inproc_transport.h"
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/gpr/host_port.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/fixtures/proxy.cc b/test/core/end2end/fixtures/proxy.cc
index 918988d9dc..bc3b0ca35c 100644
--- a/test/core/end2end/fixtures/proxy.cc
+++ b/test/core/end2end/fixtures/proxy.cc
@@ -23,9 +23,9 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include "src/core/lib/gpr/host_port.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/useful.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/tests/bad_ping.cc b/test/core/end2end/tests/bad_ping.cc
index ddab3faa27..9fff3bfb7d 100644
--- a/test/core/end2end/tests/bad_ping.cc
+++ b/test/core/end2end/tests/bad_ping.cc
@@ -23,9 +23,9 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/useful.h"
#include "test/core/end2end/cq_verifier.h"
diff --git a/test/core/end2end/tests/connectivity.cc b/test/core/end2end/tests/connectivity.cc
index 56e5189a22..a517ffa686 100644
--- a/test/core/end2end/tests/connectivity.cc
+++ b/test/core/end2end/tests/connectivity.cc
@@ -20,9 +20,9 @@
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/thd.h"
#include "test/core/end2end/cq_verifier.h"
static void* tag(intptr_t t) { return (void*)t; }
diff --git a/test/core/end2end/tests/ping.cc b/test/core/end2end/tests/ping.cc
index c01dfa858f..8fce295f90 100644
--- a/test/core/end2end/tests/ping.cc
+++ b/test/core/end2end/tests/ping.cc
@@ -20,9 +20,9 @@
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/useful.h"
#include "test/core/end2end/cq_verifier.h"
diff --git a/test/core/gpr/arena_test.cc b/test/core/gpr/arena_test.cc
index c10d7eaff7..9eaf57b631 100644
--- a/test/core/gpr/arena_test.cc
+++ b/test/core/gpr/arena_test.cc
@@ -22,11 +22,11 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <inttypes.h>
#include <string.h>
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/useful.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/gpr/cpu_test.cc b/test/core/gpr/cpu_test.cc
index 46a168665c..9f2c3f1923 100644
--- a/test/core/gpr/cpu_test.cc
+++ b/test/core/gpr/cpu_test.cc
@@ -25,10 +25,11 @@
#include <grpc/support/cpu.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include <stdio.h>
#include <string.h>
+
+#include "src/core/lib/gpr/thd.h"
#include "test/core/util/test_config.h"
/* Test structure is essentially:
diff --git a/test/core/gpr/mpscq_test.cc b/test/core/gpr/mpscq_test.cc
index 333390e928..96813466c9 100644
--- a/test/core/gpr/mpscq_test.cc
+++ b/test/core/gpr/mpscq_test.cc
@@ -23,8 +23,8 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/useful.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/gpr/spinlock_test.cc b/test/core/gpr/spinlock_test.cc
index cd6de69126..9f182bc154 100644
--- a/test/core/gpr/spinlock_test.cc
+++ b/test/core/gpr/spinlock_test.cc
@@ -22,10 +22,11 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include <stdio.h>
#include <stdlib.h>
+
+#include "src/core/lib/gpr/thd.h"
#include "test/core/util/test_config.h"
/* ------------------------------------------------- */
diff --git a/test/core/gpr/sync_test.cc b/test/core/gpr/sync_test.cc
index 39ff8852b6..bafd91020b 100644
--- a/test/core/gpr/sync_test.cc
+++ b/test/core/gpr/sync_test.cc
@@ -21,10 +21,11 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include <stdio.h>
#include <stdlib.h>
+
+#include "src/core/lib/gpr/thd.h"
#include "test/core/util/test_config.h"
/* ==================Example use of interface===================
diff --git a/test/core/gpr/thd_test.cc b/test/core/gpr/thd_test.cc
index b755bf18f3..18bbaae6c9 100644
--- a/test/core/gpr/thd_test.cc
+++ b/test/core/gpr/thd_test.cc
@@ -18,12 +18,14 @@
/* Test of gpr thread support. */
+#include "src/core/lib/gpr/thd.h"
+
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include <stdio.h>
#include <stdlib.h>
+
#include "test/core/util/test_config.h"
#define NUM_THREADS 300
diff --git a/test/core/gpr/time_test.cc b/test/core/gpr/time_test.cc
index ef7a961d0a..e6bcc1247d 100644
--- a/test/core/gpr/time_test.cc
+++ b/test/core/gpr/time_test.cc
@@ -20,12 +20,13 @@
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
+#include "src/core/lib/gpr/thd.h"
#include "test/core/util/test_config.h"
static void to_fp(void* arg, const char* buf, size_t len) {
diff --git a/test/core/gpr/tls_test.cc b/test/core/gpr/tls_test.cc
index 1ef253ed6f..1e4534dc5a 100644
--- a/test/core/gpr/tls_test.cc
+++ b/test/core/gpr/tls_test.cc
@@ -20,10 +20,10 @@
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <stdio.h>
#include <stdlib.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/tls.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/gprpp/manual_constructor_test.cc b/test/core/gprpp/manual_constructor_test.cc
index f06c3cab06..74777fe11c 100644
--- a/test/core/gprpp/manual_constructor_test.cc
+++ b/test/core/gprpp/manual_constructor_test.cc
@@ -22,10 +22,11 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <stdio.h>
#include <stdlib.h>
#include <cstring>
+
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gprpp/abstract.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/handshake/client_ssl.cc b/test/core/handshake/client_ssl.cc
index 088df3845e..fe2ab251e3 100644
--- a/test/core/handshake/client_ssl.cc
+++ b/test/core/handshake/client_ssl.cc
@@ -34,7 +34,8 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
-#include <grpc/support/thd.h>
+
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/load_file.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/handshake/readahead_handshaker_server_ssl.cc b/test/core/handshake/readahead_handshaker_server_ssl.cc
index fa3ee0bc1e..80000ca8d3 100644
--- a/test/core/handshake/readahead_handshaker_server_ssl.cc
+++ b/test/core/handshake/readahead_handshaker_server_ssl.cc
@@ -29,7 +29,8 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
+
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/load_file.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/handshake/server_ssl.cc b/test/core/handshake/server_ssl.cc
index 736d3e578e..f0465c8e3e 100644
--- a/test/core/handshake/server_ssl.cc
+++ b/test/core/handshake/server_ssl.cc
@@ -29,7 +29,8 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
+
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/load_file.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/handshake/server_ssl_common.cc b/test/core/handshake/server_ssl_common.cc
index 6f1a097dbd..d202a7cfd6 100644
--- a/test/core/handshake/server_ssl_common.cc
+++ b/test/core/handshake/server_ssl_common.cc
@@ -31,7 +31,8 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
+
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/load_file.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/handshake/server_ssl_common.h b/test/core/handshake/server_ssl_common.h
index 77865a408f..f726a1cd3a 100644
--- a/test/core/handshake/server_ssl_common.h
+++ b/test/core/handshake/server_ssl_common.h
@@ -25,7 +25,8 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
+
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/load_file.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/iomgr/combiner_test.cc b/test/core/iomgr/combiner_test.cc
index eb926cc620..8426b3d233 100644
--- a/test/core/iomgr/combiner_test.cc
+++ b/test/core/iomgr/combiner_test.cc
@@ -21,8 +21,8 @@
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/useful.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/iomgr/error_test.cc b/test/core/iomgr/error_test.cc
index 064ce0a6b2..f6292b72a9 100644
--- a/test/core/iomgr/error_test.cc
+++ b/test/core/iomgr/error_test.cc
@@ -21,10 +21,10 @@
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
#include <string.h>
+#include "src/core/lib/gpr/thd.h"
#include "test/core/util/test_config.h"
static void test_set_get_int() {
diff --git a/test/core/iomgr/ev_epollsig_linux_test.cc b/test/core/iomgr/ev_epollsig_linux_test.cc
index 5ae68d2e47..02d11271ec 100644
--- a/test/core/iomgr/ev_epollsig_linux_test.cc
+++ b/test/core/iomgr/ev_epollsig_linux_test.cc
@@ -29,8 +29,8 @@
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/iomgr/resolve_address_posix_test.cc b/test/core/iomgr/resolve_address_posix_test.cc
index 92d2338a02..341579f178 100644
--- a/test/core/iomgr/resolve_address_posix_test.cc
+++ b/test/core/iomgr/resolve_address_posix_test.cc
@@ -25,9 +25,9 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/iomgr/executor.h"
#include "src/core/lib/iomgr/iomgr.h"
diff --git a/test/core/iomgr/wakeup_fd_cv_test.cc b/test/core/iomgr/wakeup_fd_cv_test.cc
index a3f3f2008b..68dcb50aa6 100644
--- a/test/core/iomgr/wakeup_fd_cv_test.cc
+++ b/test/core/iomgr/wakeup_fd_cv_test.cc
@@ -23,10 +23,10 @@
#include <pthread.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/ev_posix.h"
#include "src/core/lib/iomgr/iomgr_posix.h"
diff --git a/test/core/network_benchmarks/low_level_ping_pong.cc b/test/core/network_benchmarks/low_level_ping_pong.cc
index 52c423b14a..33716b9d4a 100644
--- a/test/core/network_benchmarks/low_level_ping_pong.cc
+++ b/test/core/network_benchmarks/low_level_ping_pong.cc
@@ -36,9 +36,9 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/socket_utils_posix.h"
diff --git a/test/core/statistics/rpc_stats_test.cc b/test/core/statistics/rpc_stats_test.cc
index aead5cfdca..ff48075365 100644
--- a/test/core/statistics/rpc_stats_test.cc
+++ b/test/core/statistics/rpc_stats_test.cc
@@ -22,11 +22,12 @@
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/string.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+
#include "src/core/ext/census/census_interface.h"
#include "src/core/ext/census/census_rpc_stats.h"
#include "src/core/ext/census/census_tracing.h"
+#include "src/core/lib/gpr/thd.h"
#include "test/core/util/test_config.h"
/* Ensure all possible state transitions are called without causing problem */
diff --git a/test/core/surface/byte_buffer_reader_test.cc b/test/core/surface/byte_buffer_reader_test.cc
index 648a9d6986..861ed5d1a8 100644
--- a/test/core/surface/byte_buffer_reader_test.cc
+++ b/test/core/surface/byte_buffer_reader_test.cc
@@ -23,10 +23,10 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include "src/core/lib/compression/message_compress.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/surface/completion_queue_threading_test.cc b/test/core/surface/completion_queue_threading_test.cc
index e5015723f7..81319f4df4 100644
--- a/test/core/surface/completion_queue_threading_test.cc
+++ b/test/core/surface/completion_queue_threading_test.cc
@@ -20,9 +20,9 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/surface/concurrent_connectivity_test.cc b/test/core/surface/concurrent_connectivity_test.cc
index bbee073c71..95af4abd48 100644
--- a/test/core/surface/concurrent_connectivity_test.cc
+++ b/test/core/surface/concurrent_connectivity_test.cc
@@ -29,8 +29,8 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
-#include <grpc/support/thd.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "src/core/lib/iomgr/resolve_address.h"
diff --git a/test/core/surface/num_external_connectivity_watchers_test.cc b/test/core/surface/num_external_connectivity_watchers_test.cc
index e48fd7fcf2..49d28ad1c7 100644
--- a/test/core/surface/num_external_connectivity_watchers_test.cc
+++ b/test/core/surface/num_external_connectivity_watchers_test.cc
@@ -20,10 +20,10 @@
#include <grpc/grpc_security.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/host_port.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "test/core/end2end/data/ssl_test_data.h"
#include "test/core/util/port.h"
diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c
index 14267c1214..bd4dc0b60e 100644
--- a/test/core/surface/public_headers_must_be_c89.c
+++ b/test/core/surface/public_headers_must_be_c89.c
@@ -53,7 +53,7 @@
#include <grpc/support/sync.h>
#include <grpc/support/sync_custom.h>
#include <grpc/support/sync_generic.h>
-#include <grpc/support/thd.h>
+#include <grpc/support/thd_id.h>
#include <grpc/support/time.h>
#include <grpc/support/workaround_list.h>
@@ -268,14 +268,7 @@ int main(int argc, char **argv) {
printf("%lx", (unsigned long) gpr_stats_init);
printf("%lx", (unsigned long) gpr_stats_inc);
printf("%lx", (unsigned long) gpr_stats_read);
- printf("%lx", (unsigned long) gpr_thd_new);
- printf("%lx", (unsigned long) gpr_thd_options_default);
- printf("%lx", (unsigned long) gpr_thd_options_set_detached);
- printf("%lx", (unsigned long) gpr_thd_options_set_joinable);
- printf("%lx", (unsigned long) gpr_thd_options_is_detached);
- printf("%lx", (unsigned long) gpr_thd_options_is_joinable);
printf("%lx", (unsigned long) gpr_thd_currentid);
- printf("%lx", (unsigned long) gpr_thd_join);
printf("%lx", (unsigned long) gpr_time_0);
printf("%lx", (unsigned long) gpr_inf_future);
printf("%lx", (unsigned long) gpr_inf_past);
diff --git a/test/core/surface/sequential_connectivity_test.cc b/test/core/surface/sequential_connectivity_test.cc
index 1ac0a5ee13..428d17ff1b 100644
--- a/test/core/surface/sequential_connectivity_test.cc
+++ b/test/core/surface/sequential_connectivity_test.cc
@@ -20,10 +20,10 @@
#include <grpc/grpc_security.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/host_port.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "test/core/end2end/data/ssl_test_data.h"
#include "test/core/util/port.h"
diff --git a/test/core/tsi/transport_security_test_lib.cc b/test/core/tsi/transport_security_test_lib.cc
index 080585365f..7af6431c66 100644
--- a/test/core/tsi/transport_security_test_lib.cc
+++ b/test/core/tsi/transport_security_test_lib.cc
@@ -23,7 +23,8 @@
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
+
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/security/transport/tsi_error.h"
#include "test/core/tsi/transport_security_test_lib.h"
diff --git a/test/cpp/client/client_channel_stress_test.cc b/test/cpp/client/client_channel_stress_test.cc
index bb8553f56a..1d2dcae94b 100644
--- a/test/cpp/client/client_channel_stress_test.cc
+++ b/test/cpp/client/client_channel_stress_test.cc
@@ -32,10 +32,10 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/sockaddr.h"
diff --git a/test/cpp/cocoapods/generic/generic.mm b/test/cpp/cocoapods/generic/generic.mm
index 30b43ec375..5ca34f195c 100644
--- a/test/cpp/cocoapods/generic/generic.mm
+++ b/test/cpp/cocoapods/generic/generic.mm
@@ -30,9 +30,9 @@
#include <grpc++/server_context.h>
#include <grpc++/support/slice.h>
#include <grpc/grpc.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/thd.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc
index 219561868f..df706a2237 100644
--- a/test/cpp/end2end/async_end2end_test.cc
+++ b/test/cpp/end2end/async_end2end_test.cc
@@ -30,10 +30,10 @@
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/tls.h"
#include "src/core/lib/iomgr/port.h"
#include "src/proto/grpc/health/v1/health.grpc.pb.h"
diff --git a/test/cpp/end2end/client_crash_test.cc b/test/cpp/end2end/client_crash_test.cc
index f34b27511b..c28ffea79c 100644
--- a/test/cpp/end2end/client_crash_test.cc
+++ b/test/cpp/end2end/client_crash_test.cc
@@ -24,9 +24,9 @@
#include <grpc++/server_context.h>
#include <grpc/grpc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc
index f1816af3ce..16600d12b0 100644
--- a/test/cpp/end2end/client_lb_end2end_test.cc
+++ b/test/cpp/end2end/client_lb_end2end_test.cc
@@ -32,13 +32,13 @@
#include <grpc/support/atm.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h"
#include "src/core/ext/filters/client_channel/subchannel_index.h"
#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc
index cd8321771a..38fdde990f 100644
--- a/test/cpp/end2end/end2end_test.cc
+++ b/test/cpp/end2end/end2end_test.cc
@@ -32,10 +32,10 @@
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/security/credentials/credentials.h"
#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
diff --git a/test/cpp/end2end/filter_end2end_test.cc b/test/cpp/end2end/filter_end2end_test.cc
index d11df3a143..ae6c6c7d11 100644
--- a/test/cpp/end2end/filter_end2end_test.cc
+++ b/test/cpp/end2end/filter_end2end_test.cc
@@ -31,9 +31,9 @@
#include <grpc++/support/config.h>
#include <grpc++/support/slice.h>
#include <grpc/grpc.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/cpp/common/channel_filter.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
diff --git a/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc
index c778b205e0..86a41fc585 100644
--- a/test/cpp/end2end/generic_end2end_test.cc
+++ b/test/cpp/end2end/generic_end2end_test.cc
@@ -29,9 +29,9 @@
#include <grpc++/server_context.h>
#include <grpc++/support/slice.h>
#include <grpc/grpc.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc
index 89c9c2bf76..da5d498963 100644
--- a/test/cpp/end2end/grpclb_end2end_test.cc
+++ b/test/cpp/end2end/grpclb_end2end_test.cc
@@ -30,11 +30,11 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h"
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/sockaddr.h"
diff --git a/test/cpp/end2end/mock_test.cc b/test/cpp/end2end/mock_test.cc
index 175ecea2b3..fe530432ea 100644
--- a/test/cpp/end2end/mock_test.cc
+++ b/test/cpp/end2end/mock_test.cc
@@ -27,9 +27,9 @@
#include <grpc++/server_context.h>
#include <grpc/grpc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "src/proto/grpc/testing/echo_mock.grpc.pb.h"
diff --git a/test/cpp/end2end/server_crash_test.cc b/test/cpp/end2end/server_crash_test.cc
index 528951bb9b..574d357bef 100644
--- a/test/cpp/end2end/server_crash_test.cc
+++ b/test/cpp/end2end/server_crash_test.cc
@@ -24,9 +24,9 @@
#include <grpc++/server_context.h>
#include <grpc/grpc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
diff --git a/test/cpp/end2end/server_early_return_test.cc b/test/cpp/end2end/server_early_return_test.cc
index 6fd26fcdb6..38f9b6755c 100644
--- a/test/cpp/end2end/server_early_return_test.cc
+++ b/test/cpp/end2end/server_early_return_test.cc
@@ -27,9 +27,9 @@
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
diff --git a/test/cpp/end2end/streaming_throughput_test.cc b/test/cpp/end2end/streaming_throughput_test.cc
index 8fcb8b1d48..2c8928151a 100644
--- a/test/cpp/end2end/streaming_throughput_test.cc
+++ b/test/cpp/end2end/streaming_throughput_test.cc
@@ -31,9 +31,9 @@
#include <grpc/grpc.h>
#include <grpc/support/atm.h>
#include <grpc/support/log.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc
index 79074d8e70..0842d8e64a 100644
--- a/test/cpp/end2end/thread_stress_test.cc
+++ b/test/cpp/end2end/thread_stress_test.cc
@@ -26,9 +26,9 @@
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
#include <grpc/grpc.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc
index d17c2957a2..9f6d9fabde 100644
--- a/test/cpp/grpclb/grpclb_test.cc
+++ b/test/cpp/grpclb/grpclb_test.cc
@@ -30,7 +30,6 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include <grpc++/impl/codegen/config.h>
@@ -42,6 +41,7 @@
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/gpr/tmpfile.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/sockaddr.h"
diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++
index 487753585b..0741c7984a 100644
--- a/tools/doxygen/Doxyfile.c++
+++ b/tools/doxygen/Doxyfile.c++
@@ -919,7 +919,7 @@ include/grpc/support/sync_custom.h \
include/grpc/support/sync_generic.h \
include/grpc/support/sync_posix.h \
include/grpc/support/sync_windows.h \
-include/grpc/support/thd.h \
+include/grpc/support/thd_id.h \
include/grpc/support/time.h \
include/grpc/support/workaround_list.h
diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal
index 8dd282a179..d4b2b2b818 100644
--- a/tools/doxygen/Doxyfile.c++.internal
+++ b/tools/doxygen/Doxyfile.c++.internal
@@ -920,7 +920,7 @@ include/grpc/support/sync_custom.h \
include/grpc/support/sync_generic.h \
include/grpc/support/sync_posix.h \
include/grpc/support/sync_windows.h \
-include/grpc/support/thd.h \
+include/grpc/support/thd_id.h \
include/grpc/support/time.h \
include/grpc/support/workaround_list.h \
src/core/ext/transport/inproc/inproc_transport.h \
@@ -952,7 +952,7 @@ src/core/lib/gpr/murmur_hash.h \
src/core/lib/gpr/spinlock.h \
src/core/lib/gpr/string.h \
src/core/lib/gpr/string_windows.h \
-src/core/lib/gpr/thd_internal.h \
+src/core/lib/gpr/thd.h \
src/core/lib/gpr/time_precise.h \
src/core/lib/gpr/tls.h \
src/core/lib/gpr/tls_gcc.h \
diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core
index d398783637..04f9d78850 100644
--- a/tools/doxygen/Doxyfile.core
+++ b/tools/doxygen/Doxyfile.core
@@ -859,7 +859,7 @@ include/grpc/support/sync_custom.h \
include/grpc/support/sync_generic.h \
include/grpc/support/sync_posix.h \
include/grpc/support/sync_windows.h \
-include/grpc/support/thd.h \
+include/grpc/support/thd_id.h \
include/grpc/support/time.h \
include/grpc/support/workaround_list.h
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index c563f4073e..c095b5bed9 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -859,7 +859,7 @@ include/grpc/support/sync_custom.h \
include/grpc/support/sync_generic.h \
include/grpc/support/sync_posix.h \
include/grpc/support/sync_windows.h \
-include/grpc/support/thd.h \
+include/grpc/support/thd_id.h \
include/grpc/support/time.h \
include/grpc/support/workaround_list.h \
src/core/README.md \
@@ -1095,7 +1095,7 @@ src/core/lib/gpr/sync.cc \
src/core/lib/gpr/sync_posix.cc \
src/core/lib/gpr/sync_windows.cc \
src/core/lib/gpr/thd.cc \
-src/core/lib/gpr/thd_internal.h \
+src/core/lib/gpr/thd.h \
src/core/lib/gpr/thd_posix.cc \
src/core/lib/gpr/thd_windows.cc \
src/core/lib/gpr/time.cc \
diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json
index 72c8498821..46133579ed 100644
--- a/tools/run_tests/generated/sources_and_headers.json
+++ b/tools/run_tests/generated/sources_and_headers.json
@@ -8276,7 +8276,7 @@
"include/grpc/support/sync_generic.h",
"include/grpc/support/sync_posix.h",
"include/grpc/support/sync_windows.h",
- "include/grpc/support/thd.h",
+ "include/grpc/support/thd_id.h",
"include/grpc/support/time.h",
"src/core/lib/gpr/arena.h",
"src/core/lib/gpr/env.h",
@@ -8287,7 +8287,7 @@
"src/core/lib/gpr/spinlock.h",
"src/core/lib/gpr/string.h",
"src/core/lib/gpr/string_windows.h",
- "src/core/lib/gpr/thd_internal.h",
+ "src/core/lib/gpr/thd.h",
"src/core/lib/gpr/time_precise.h",
"src/core/lib/gpr/tls.h",
"src/core/lib/gpr/tls_gcc.h",
@@ -8322,7 +8322,7 @@
"include/grpc/support/sync_generic.h",
"include/grpc/support/sync_posix.h",
"include/grpc/support/sync_windows.h",
- "include/grpc/support/thd.h",
+ "include/grpc/support/thd_id.h",
"include/grpc/support/time.h",
"src/core/lib/gpr/arena.h",
"src/core/lib/gpr/env.h",
@@ -8333,7 +8333,7 @@
"src/core/lib/gpr/spinlock.h",
"src/core/lib/gpr/string.h",
"src/core/lib/gpr/string_windows.h",
- "src/core/lib/gpr/thd_internal.h",
+ "src/core/lib/gpr/thd.h",
"src/core/lib/gpr/time_precise.h",
"src/core/lib/gpr/tls.h",
"src/core/lib/gpr/tls_gcc.h",