Merge pull request #14196 from vjpai/gpr_review_tls
GPR review: Privatize thread-local storage headers
diff --git a/BUILD b/BUILD
index 3461f0d..aa4d492 100644
--- a/BUILD
+++ b/BUILD
@@ -79,10 +79,6 @@
"include/grpc/support/sync_windows.h",
"include/grpc/support/thd.h",
"include/grpc/support/time.h",
- "include/grpc/support/tls.h",
- "include/grpc/support/tls_gcc.h",
- "include/grpc/support/tls_msvc.h",
- "include/grpc/support/tls_pthread.h",
"include/grpc/support/useful.h",
]
@@ -504,6 +500,10 @@
"src/core/lib/gpr/string_windows.h",
"src/core/lib/gpr/thd_internal.h",
"src/core/lib/gpr/time_precise.h",
+ "src/core/lib/gpr/tls.h",
+ "src/core/lib/gpr/tls_gcc.h",
+ "src/core/lib/gpr/tls_msvc.h",
+ "src/core/lib/gpr/tls_pthread.h",
"src/core/lib/gpr/tmpfile.h",
],
language = "c++",
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8e0623b..eb620fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -714,10 +714,6 @@
include/grpc/support/sync_windows.h
include/grpc/support/thd.h
include/grpc/support/time.h
- include/grpc/support/tls.h
- include/grpc/support/tls_gcc.h
- include/grpc/support/tls_msvc.h
- include/grpc/support/tls_pthread.h
include/grpc/support/useful.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
@@ -2541,10 +2537,6 @@
include/grpc/support/sync_windows.h
include/grpc/support/thd.h
include/grpc/support/time.h
- include/grpc/support/tls.h
- include/grpc/support/tls_gcc.h
- include/grpc/support/tls_msvc.h
- include/grpc/support/tls_pthread.h
include/grpc/support/useful.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
@@ -3010,10 +3002,6 @@
include/grpc/support/sync_windows.h
include/grpc/support/thd.h
include/grpc/support/time.h
- include/grpc/support/tls.h
- include/grpc/support/tls_gcc.h
- include/grpc/support/tls_msvc.h
- include/grpc/support/tls_pthread.h
include/grpc/support/useful.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
@@ -3737,10 +3725,6 @@
include/grpc/support/sync_windows.h
include/grpc/support/thd.h
include/grpc/support/time.h
- include/grpc/support/tls.h
- include/grpc/support/tls_gcc.h
- include/grpc/support/tls_msvc.h
- include/grpc/support/tls_pthread.h
include/grpc/support/useful.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
diff --git a/Makefile b/Makefile
index a15b2a1..f3a8c86 100644
--- a/Makefile
+++ b/Makefile
@@ -2934,10 +2934,6 @@
include/grpc/support/sync_windows.h \
include/grpc/support/thd.h \
include/grpc/support/time.h \
- include/grpc/support/tls.h \
- include/grpc/support/tls_gcc.h \
- include/grpc/support/tls_msvc.h \
- include/grpc/support/tls_pthread.h \
include/grpc/support/useful.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
@@ -4699,10 +4695,6 @@
include/grpc/support/sync_windows.h \
include/grpc/support/thd.h \
include/grpc/support/time.h \
- include/grpc/support/tls.h \
- include/grpc/support/tls_gcc.h \
- include/grpc/support/tls_msvc.h \
- include/grpc/support/tls_pthread.h \
include/grpc/support/useful.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
@@ -5181,10 +5173,6 @@
include/grpc/support/sync_windows.h \
include/grpc/support/thd.h \
include/grpc/support/time.h \
- include/grpc/support/tls.h \
- include/grpc/support/tls_gcc.h \
- include/grpc/support/tls_msvc.h \
- include/grpc/support/tls_pthread.h \
include/grpc/support/useful.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
@@ -5897,10 +5885,6 @@
include/grpc/support/sync_windows.h \
include/grpc/support/thd.h \
include/grpc/support/time.h \
- include/grpc/support/tls.h \
- include/grpc/support/tls_gcc.h \
- include/grpc/support/tls_msvc.h \
- include/grpc/support/tls_pthread.h \
include/grpc/support/useful.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
diff --git a/build.yaml b/build.yaml
index 6b7b65e..3427641 100644
--- a/build.yaml
+++ b/build.yaml
@@ -96,10 +96,6 @@
- include/grpc/support/sync_windows.h
- include/grpc/support/thd.h
- include/grpc/support/time.h
- - include/grpc/support/tls.h
- - include/grpc/support/tls_gcc.h
- - include/grpc/support/tls_msvc.h
- - include/grpc/support/tls_pthread.h
- include/grpc/support/useful.h
headers:
- src/core/lib/gpr/arena.h
@@ -113,6 +109,10 @@
- src/core/lib/gpr/string_windows.h
- src/core/lib/gpr/thd_internal.h
- src/core/lib/gpr/time_precise.h
+ - src/core/lib/gpr/tls.h
+ - src/core/lib/gpr/tls_gcc.h
+ - src/core/lib/gpr/tls_msvc.h
+ - src/core/lib/gpr/tls_pthread.h
- src/core/lib/gpr/tmpfile.h
- src/core/lib/gprpp/abstract.h
- src/core/lib/gprpp/atomic.h
diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec
index 9121741..fa6bb73 100644
--- a/gRPC-C++.podspec
+++ b/gRPC-C++.podspec
@@ -214,6 +214,10 @@
'src/core/lib/gpr/string_windows.h',
'src/core/lib/gpr/thd_internal.h',
'src/core/lib/gpr/time_precise.h',
+ 'src/core/lib/gpr/tls.h',
+ 'src/core/lib/gpr/tls_gcc.h',
+ 'src/core/lib/gpr/tls_msvc.h',
+ 'src/core/lib/gpr/tls_pthread.h',
'src/core/lib/gpr/tmpfile.h',
'src/core/lib/gprpp/abstract.h',
'src/core/lib/gprpp/atomic.h',
@@ -460,6 +464,10 @@
'src/core/lib/gpr/string_windows.h',
'src/core/lib/gpr/thd_internal.h',
'src/core/lib/gpr/time_precise.h',
+ 'src/core/lib/gpr/tls.h',
+ 'src/core/lib/gpr/tls_gcc.h',
+ 'src/core/lib/gpr/tls_msvc.h',
+ 'src/core/lib/gpr/tls_pthread.h',
'src/core/lib/gpr/tmpfile.h',
'src/core/lib/gprpp/abstract.h',
'src/core/lib/gprpp/atomic.h',
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index 8782114..5c3a126 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -127,10 +127,6 @@
'include/grpc/support/sync_windows.h',
'include/grpc/support/thd.h',
'include/grpc/support/time.h',
- 'include/grpc/support/tls.h',
- 'include/grpc/support/tls_gcc.h',
- 'include/grpc/support/tls_msvc.h',
- 'include/grpc/support/tls_pthread.h',
'include/grpc/support/useful.h',
'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h',
@@ -200,6 +196,10 @@
'src/core/lib/gpr/string_windows.h',
'src/core/lib/gpr/thd_internal.h',
'src/core/lib/gpr/time_precise.h',
+ 'src/core/lib/gpr/tls.h',
+ 'src/core/lib/gpr/tls_gcc.h',
+ 'src/core/lib/gpr/tls_msvc.h',
+ 'src/core/lib/gpr/tls_pthread.h',
'src/core/lib/gpr/tmpfile.h',
'src/core/lib/gprpp/abstract.h',
'src/core/lib/gprpp/atomic.h',
@@ -723,6 +723,10 @@
'src/core/lib/gpr/string_windows.h',
'src/core/lib/gpr/thd_internal.h',
'src/core/lib/gpr/time_precise.h',
+ 'src/core/lib/gpr/tls.h',
+ 'src/core/lib/gpr/tls_gcc.h',
+ 'src/core/lib/gpr/tls_msvc.h',
+ 'src/core/lib/gpr/tls_pthread.h',
'src/core/lib/gpr/tmpfile.h',
'src/core/lib/gprpp/abstract.h',
'src/core/lib/gprpp/atomic.h',
diff --git a/grpc.gemspec b/grpc.gemspec
index d6aea15..66bd9fd 100644
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -62,10 +62,6 @@
s.files += %w( include/grpc/support/sync_windows.h )
s.files += %w( include/grpc/support/thd.h )
s.files += %w( include/grpc/support/time.h )
- s.files += %w( include/grpc/support/tls.h )
- s.files += %w( include/grpc/support/tls_gcc.h )
- s.files += %w( include/grpc/support/tls_msvc.h )
- s.files += %w( include/grpc/support/tls_pthread.h )
s.files += %w( include/grpc/support/useful.h )
s.files += %w( include/grpc/impl/codegen/atm.h )
s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h )
@@ -91,6 +87,10 @@
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/time_precise.h )
+ s.files += %w( src/core/lib/gpr/tls.h )
+ s.files += %w( src/core/lib/gpr/tls_gcc.h )
+ s.files += %w( src/core/lib/gpr/tls_msvc.h )
+ s.files += %w( src/core/lib/gpr/tls_pthread.h )
s.files += %w( src/core/lib/gpr/tmpfile.h )
s.files += %w( src/core/lib/gprpp/abstract.h )
s.files += %w( src/core/lib/gprpp/atomic.h )
diff --git a/include/grpc/module.modulemap b/include/grpc/module.modulemap
index 4f6bf6c..9e16957 100644
--- a/include/grpc/module.modulemap
+++ b/include/grpc/module.modulemap
@@ -14,7 +14,6 @@
header "support/sync_generic.h"
header "support/thd.h"
header "support/time.h"
- header "support/tls.h"
header "support/useful.h"
header "impl/codegen/atm.h"
header "impl/codegen/fork.h"
@@ -59,9 +58,6 @@
textual header "support/sync_custom.h"
textual header "support/sync_posix.h"
textual header "support/sync_windows.h"
- textual header "support/tls_gcc.h"
- textual header "support/tls_msvc.h"
- textual header "support/tls_pthread.h"
textual header "impl/codegen/atm_gcc_atomic.h"
textual header "impl/codegen/atm_gcc_sync.h"
textual header "impl/codegen/atm_windows.h"
diff --git a/package.xml b/package.xml
index 23a4ac1..6883b72 100644
--- a/package.xml
+++ b/package.xml
@@ -69,10 +69,6 @@
<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/time.h" role="src" />
- <file baseinstalldir="/" name="include/grpc/support/tls.h" role="src" />
- <file baseinstalldir="/" name="include/grpc/support/tls_gcc.h" role="src" />
- <file baseinstalldir="/" name="include/grpc/support/tls_msvc.h" role="src" />
- <file baseinstalldir="/" name="include/grpc/support/tls_pthread.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/useful.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" />
@@ -98,6 +94,10 @@
<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/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" />
+ <file baseinstalldir="/" name="src/core/lib/gpr/tls_msvc.h" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/gpr/tls_pthread.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/tmpfile.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/abstract.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/atomic.h" role="src" />
diff --git a/src/core/ext/filters/client_channel/subchannel_index.cc b/src/core/ext/filters/client_channel/subchannel_index.cc
index 052b047..6ba0d2f 100644
--- a/src/core/ext/filters/client_channel/subchannel_index.cc
+++ b/src/core/ext/filters/client_channel/subchannel_index.cc
@@ -24,9 +24,9 @@
#include <grpc/support/alloc.h>
#include <grpc/support/avl.h>
#include <grpc/support/string_util.h>
-#include <grpc/support/tls.h>
#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/gpr/tls.h"
// a map of subchannel_key --> subchannel, used for detecting connections
// to the same destination in order to share them
diff --git a/include/grpc/support/tls.h b/src/core/lib/gpr/tls.h
similarity index 87%
rename from include/grpc/support/tls.h
rename to src/core/lib/gpr/tls.h
index 4c9e79b..aee8f4d 100644
--- a/include/grpc/support/tls.h
+++ b/src/core/lib/gpr/tls.h
@@ -16,8 +16,8 @@
*
*/
-#ifndef GRPC_SUPPORT_TLS_H
-#define GRPC_SUPPORT_TLS_H
+#ifndef GRPC_CORE_LIB_GPR_TLS_H
+#define GRPC_CORE_LIB_GPR_TLS_H
#include <grpc/support/port_platform.h>
@@ -54,15 +54,15 @@
ALL functions here may be implemented as macros. */
#ifdef GPR_GCC_TLS
-#include <grpc/support/tls_gcc.h>
+#include "src/core/lib/gpr/tls_gcc.h"
#endif
#ifdef GPR_MSVC_TLS
-#include <grpc/support/tls_msvc.h>
+#include "src/core/lib/gpr/tls_msvc.h"
#endif
#ifdef GPR_PTHREAD_TLS
-#include <grpc/support/tls_pthread.h>
+#include "src/core/lib/gpr/tls_pthread.h"
#endif
-#endif /* GRPC_SUPPORT_TLS_H */
+#endif /* GRPC_CORE_LIB_GPR_TLS_H */
diff --git a/include/grpc/support/tls_gcc.h b/src/core/lib/gpr/tls_gcc.h
similarity index 91%
rename from include/grpc/support/tls_gcc.h
rename to src/core/lib/gpr/tls_gcc.h
index b44f0f1..14c59ec 100644
--- a/include/grpc/support/tls_gcc.h
+++ b/src/core/lib/gpr/tls_gcc.h
@@ -16,8 +16,8 @@
*
*/
-#ifndef GRPC_SUPPORT_TLS_GCC_H
-#define GRPC_SUPPORT_TLS_GCC_H
+#ifndef GRPC_CORE_LIB_GPR_TLS_GCC_H
+#define GRPC_CORE_LIB_GPR_TLS_GCC_H
#include <stdbool.h>
@@ -47,4 +47,4 @@
#define gpr_tls_set(tls, new_value) (((tls)->value) = (new_value))
#define gpr_tls_get(tls) ((tls)->value)
-#endif /* GRPC_SUPPORT_TLS_GCC_H */
+#endif /* GRPC_CORE_LIB_GPR_TLS_GCC_H */
diff --git a/include/grpc/support/tls_msvc.h b/src/core/lib/gpr/tls_msvc.h
similarity index 92%
rename from include/grpc/support/tls_msvc.h
rename to src/core/lib/gpr/tls_msvc.h
index 68a411f..a6cc417 100644
--- a/include/grpc/support/tls_msvc.h
+++ b/src/core/lib/gpr/tls_msvc.h
@@ -16,8 +16,8 @@
*
*/
-#ifndef GRPC_SUPPORT_TLS_MSVC_H
-#define GRPC_SUPPORT_TLS_MSVC_H
+#ifndef GRPC_CORE_LIB_GPR_TLS_MSVC_H
+#define GRPC_CORE_LIB_GPR_TLS_MSVC_H
/** Thread local storage based on ms visual c compiler primitives.
#include tls.h to use this - and see that file for documentation */
@@ -47,4 +47,4 @@
#define gpr_tls_set(tls, new_value) (((tls)->value) = (new_value))
#define gpr_tls_get(tls) ((tls)->value)
-#endif /* GRPC_SUPPORT_TLS_MSVC_H */
+#endif /* GRPC_CORE_LIB_GPR_TLS_MSVC_H */
diff --git a/src/core/lib/gpr/tls_pthread.cc b/src/core/lib/gpr/tls_pthread.cc
index ebeef2a..2e5b306 100644
--- a/src/core/lib/gpr/tls_pthread.cc
+++ b/src/core/lib/gpr/tls_pthread.cc
@@ -20,7 +20,7 @@
#ifdef GPR_PTHREAD_TLS
-#include <grpc/support/tls.h>
+#include "src/core/lib/gpr/tls.h"
intptr_t gpr_tls_set(struct gpr_pthread_thread_local* tls, intptr_t value) {
GPR_ASSERT(0 == pthread_setspecific(tls->key, (void*)value));
diff --git a/include/grpc/support/tls_pthread.h b/src/core/lib/gpr/tls_pthread.h
similarity index 93%
rename from include/grpc/support/tls_pthread.h
rename to src/core/lib/gpr/tls_pthread.h
index 249c8b1..9202653 100644
--- a/include/grpc/support/tls_pthread.h
+++ b/src/core/lib/gpr/tls_pthread.h
@@ -16,8 +16,8 @@
*
*/
-#ifndef GRPC_SUPPORT_TLS_PTHREAD_H
-#define GRPC_SUPPORT_TLS_PTHREAD_H
+#ifndef GRPC_CORE_LIB_GPR_TLS_PTHREAD_H
+#define GRPC_CORE_LIB_GPR_TLS_PTHREAD_H
#include <grpc/support/log.h> /* for GPR_ASSERT */
#include <pthread.h>
@@ -51,4 +51,4 @@
}
#endif
-#endif /* GRPC_SUPPORT_TLS_PTHREAD_H */
+#endif /* GRPC_CORE_LIB_GPR_TLS_PTHREAD_H */
diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc
index 1ef70d2..b7b5662 100644
--- a/src/core/lib/iomgr/ev_epoll1_linux.cc
+++ b/src/core/lib/iomgr/ev_epoll1_linux.cc
@@ -39,11 +39,11 @@
#include <grpc/support/alloc.h>
#include <grpc/support/cpu.h>
#include <grpc/support/string_util.h>
-#include <grpc/support/tls.h>
#include <grpc/support/useful.h>
#include "src/core/lib/debug/stats.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gpr/tls.h"
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/ev_posix.h"
diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc
index 30c7a89..cd5a410 100644
--- a/src/core/lib/iomgr/ev_epollex_linux.cc
+++ b/src/core/lib/iomgr/ev_epollex_linux.cc
@@ -37,11 +37,11 @@
#include <grpc/support/alloc.h>
#include <grpc/support/string_util.h>
-#include <grpc/support/tls.h>
#include <grpc/support/useful.h>
#include "src/core/lib/debug/stats.h"
#include "src/core/lib/gpr/spinlock.h"
+#include "src/core/lib/gpr/tls.h"
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
diff --git a/src/core/lib/iomgr/ev_epollsig_linux.cc b/src/core/lib/iomgr/ev_epollsig_linux.cc
index c895489..416447f 100644
--- a/src/core/lib/iomgr/ev_epollsig_linux.cc
+++ b/src/core/lib/iomgr/ev_epollsig_linux.cc
@@ -39,10 +39,10 @@
#include <grpc/support/alloc.h>
#include <grpc/support/string_util.h>
-#include <grpc/support/tls.h>
#include <grpc/support/useful.h>
#include "src/core/lib/debug/stats.h"
+#include "src/core/lib/gpr/tls.h"
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/ev_posix.h"
diff --git a/src/core/lib/iomgr/ev_poll_posix.cc b/src/core/lib/iomgr/ev_poll_posix.cc
index 8ccc256..5284fb4 100644
--- a/src/core/lib/iomgr/ev_poll_posix.cc
+++ b/src/core/lib/iomgr/ev_poll_posix.cc
@@ -34,11 +34,11 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/thd.h>
-#include <grpc/support/tls.h>
#include <grpc/support/useful.h>
#include "src/core/lib/debug/stats.h"
#include "src/core/lib/gpr/murmur_hash.h"
+#include "src/core/lib/gpr/tls.h"
#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
#include "src/core/lib/iomgr/wakeup_fd_cv.h"
diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h
index 2e71482..3d9a157 100644
--- a/src/core/lib/iomgr/exec_ctx.h
+++ b/src/core/lib/iomgr/exec_ctx.h
@@ -22,8 +22,8 @@
#include <grpc/support/atm.h>
#include <grpc/support/cpu.h>
#include <grpc/support/log.h>
-#include <grpc/support/tls.h>
+#include "src/core/lib/gpr/tls.h"
#include "src/core/lib/iomgr/closure.h"
typedef gpr_atm grpc_millis;
diff --git a/src/core/lib/iomgr/executor.cc b/src/core/lib/iomgr/executor.cc
index 835dc9d..30157e3 100644
--- a/src/core/lib/iomgr/executor.cc
+++ b/src/core/lib/iomgr/executor.cc
@@ -25,11 +25,11 @@
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include <grpc/support/thd.h>
-#include <grpc/support/tls.h>
#include <grpc/support/useful.h>
#include "src/core/lib/debug/stats.h"
#include "src/core/lib/gpr/spinlock.h"
+#include "src/core/lib/gpr/tls.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#define MAX_DEPTH 2
diff --git a/src/core/lib/iomgr/timer_generic.cc b/src/core/lib/iomgr/timer_generic.cc
index 177bdec..015142f 100644
--- a/src/core/lib/iomgr/timer_generic.cc
+++ b/src/core/lib/iomgr/timer_generic.cc
@@ -29,10 +29,11 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include <grpc/support/tls.h>
#include <grpc/support/useful.h>
+
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gpr/spinlock.h"
+#include "src/core/lib/gpr/tls.h"
#include "src/core/lib/iomgr/time_averaged_stats.h"
#include "src/core/lib/iomgr/timer_heap.h"
diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc
index 8362522..a2c5208 100644
--- a/src/core/lib/surface/completion_queue.cc
+++ b/src/core/lib/surface/completion_queue.cc
@@ -28,11 +28,11 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
-#include <grpc/support/tls.h>
#include "src/core/lib/debug/stats.h"
#include "src/core/lib/gpr/spinlock.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gpr/tls.h"
#include "src/core/lib/iomgr/pollset.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/profiling/timers.h"
diff --git a/test/core/gpr/tls_test.cc b/test/core/gpr/tls_test.cc
index 743b10f..1ef253e 100644
--- a/test/core/gpr/tls_test.cc
+++ b/test/core/gpr/tls_test.cc
@@ -21,9 +21,10 @@
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include <grpc/support/thd.h>
-#include <grpc/support/tls.h>
#include <stdio.h>
#include <stdlib.h>
+
+#include "src/core/lib/gpr/tls.h"
#include "test/core/util/test_config.h"
#define NUM_THREADS 100
diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c
index 61b80ae..be2a5b7 100644
--- a/test/core/surface/public_headers_must_be_c89.c
+++ b/test/core/surface/public_headers_must_be_c89.c
@@ -56,7 +56,6 @@
#include <grpc/support/sync_generic.h>
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
-#include <grpc/support/tls.h>
#include <grpc/support/useful.h>
#include <grpc/support/workaround_list.h>
diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc
index 44cd81a..482f0cb 100644
--- a/test/cpp/end2end/async_end2end_test.cc
+++ b/test/cpp/end2end/async_end2end_test.cc
@@ -32,9 +32,9 @@
#include <grpc/support/log.h>
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
-#include <grpc/support/tls.h>
#include "src/core/lib/gpr/env.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"
#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h"
diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++
index bf73985..8d3d013 100644
--- a/tools/doxygen/Doxyfile.c++
+++ b/tools/doxygen/Doxyfile.c++
@@ -922,10 +922,6 @@
include/grpc/support/sync_windows.h \
include/grpc/support/thd.h \
include/grpc/support/time.h \
-include/grpc/support/tls.h \
-include/grpc/support/tls_gcc.h \
-include/grpc/support/tls_msvc.h \
-include/grpc/support/tls_pthread.h \
include/grpc/support/useful.h \
include/grpc/support/workaround_list.h
diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal
index 3db9bdf..5729aaa 100644
--- a/tools/doxygen/Doxyfile.c++.internal
+++ b/tools/doxygen/Doxyfile.c++.internal
@@ -923,10 +923,6 @@
include/grpc/support/sync_windows.h \
include/grpc/support/thd.h \
include/grpc/support/time.h \
-include/grpc/support/tls.h \
-include/grpc/support/tls_gcc.h \
-include/grpc/support/tls_msvc.h \
-include/grpc/support/tls_pthread.h \
include/grpc/support/useful.h \
include/grpc/support/workaround_list.h \
src/core/ext/transport/inproc/inproc_transport.h \
@@ -959,6 +955,10 @@
src/core/lib/gpr/string_windows.h \
src/core/lib/gpr/thd_internal.h \
src/core/lib/gpr/time_precise.h \
+src/core/lib/gpr/tls.h \
+src/core/lib/gpr/tls_gcc.h \
+src/core/lib/gpr/tls_msvc.h \
+src/core/lib/gpr/tls_pthread.h \
src/core/lib/gpr/tmpfile.h \
src/core/lib/gprpp/abstract.h \
src/core/lib/gprpp/atomic.h \
diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core
index 35f925d..3b7bd3a 100644
--- a/tools/doxygen/Doxyfile.core
+++ b/tools/doxygen/Doxyfile.core
@@ -862,10 +862,6 @@
include/grpc/support/sync_windows.h \
include/grpc/support/thd.h \
include/grpc/support/time.h \
-include/grpc/support/tls.h \
-include/grpc/support/tls_gcc.h \
-include/grpc/support/tls_msvc.h \
-include/grpc/support/tls_pthread.h \
include/grpc/support/useful.h \
include/grpc/support/workaround_list.h
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index 4b65dd6..3d86760 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -862,10 +862,6 @@
include/grpc/support/sync_windows.h \
include/grpc/support/thd.h \
include/grpc/support/time.h \
-include/grpc/support/tls.h \
-include/grpc/support/tls_gcc.h \
-include/grpc/support/tls_msvc.h \
-include/grpc/support/tls_pthread.h \
include/grpc/support/useful.h \
include/grpc/support/workaround_list.h \
src/core/README.md \
@@ -1108,7 +1104,11 @@
src/core/lib/gpr/time_precise.cc \
src/core/lib/gpr/time_precise.h \
src/core/lib/gpr/time_windows.cc \
+src/core/lib/gpr/tls.h \
+src/core/lib/gpr/tls_gcc.h \
+src/core/lib/gpr/tls_msvc.h \
src/core/lib/gpr/tls_pthread.cc \
+src/core/lib/gpr/tls_pthread.h \
src/core/lib/gpr/tmpfile.h \
src/core/lib/gpr/tmpfile_msys.cc \
src/core/lib/gpr/tmpfile_posix.cc \
diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json
index cc19cc5..7661a23 100644
--- a/tools/run_tests/generated/sources_and_headers.json
+++ b/tools/run_tests/generated/sources_and_headers.json
@@ -8260,10 +8260,6 @@
"include/grpc/support/sync_windows.h",
"include/grpc/support/thd.h",
"include/grpc/support/time.h",
- "include/grpc/support/tls.h",
- "include/grpc/support/tls_gcc.h",
- "include/grpc/support/tls_msvc.h",
- "include/grpc/support/tls_pthread.h",
"include/grpc/support/useful.h",
"src/core/lib/gpr/arena.h",
"src/core/lib/gpr/env.h",
@@ -8276,6 +8272,10 @@
"src/core/lib/gpr/string_windows.h",
"src/core/lib/gpr/thd_internal.h",
"src/core/lib/gpr/time_precise.h",
+ "src/core/lib/gpr/tls.h",
+ "src/core/lib/gpr/tls_gcc.h",
+ "src/core/lib/gpr/tls_msvc.h",
+ "src/core/lib/gpr/tls_pthread.h",
"src/core/lib/gpr/tmpfile.h",
"src/core/lib/gprpp/abstract.h",
"src/core/lib/gprpp/atomic.h",
@@ -8307,10 +8307,6 @@
"include/grpc/support/sync_windows.h",
"include/grpc/support/thd.h",
"include/grpc/support/time.h",
- "include/grpc/support/tls.h",
- "include/grpc/support/tls_gcc.h",
- "include/grpc/support/tls_msvc.h",
- "include/grpc/support/tls_pthread.h",
"include/grpc/support/useful.h",
"src/core/lib/gpr/arena.h",
"src/core/lib/gpr/env.h",
@@ -8323,6 +8319,10 @@
"src/core/lib/gpr/string_windows.h",
"src/core/lib/gpr/thd_internal.h",
"src/core/lib/gpr/time_precise.h",
+ "src/core/lib/gpr/tls.h",
+ "src/core/lib/gpr/tls_gcc.h",
+ "src/core/lib/gpr/tls_msvc.h",
+ "src/core/lib/gpr/tls_pthread.h",
"src/core/lib/gpr/tmpfile.h",
"src/core/lib/gprpp/abstract.h",
"src/core/lib/gprpp/atomic.h",