diff options
author | Vijay Pai <vpai@google.com> | 2018-02-08 13:24:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-08 13:24:39 -0800 |
commit | 0024ebc85232333efdbd18899eb6f7bba6b570d8 (patch) | |
tree | 136410619009bf4d8358464dc68ecc6ae04357b0 | |
parent | 2a073981f384cc117e7e6b3835888bbf8d30540c (diff) | |
parent | 25b61fd60e9fd24c3b23eac9396e22745f1cf51d (diff) |
Merge pull request #14196 from vjpai/gpr_review_tls
GPR review: Privatize thread-local storage headers
31 files changed, 77 insertions, 108 deletions
@@ -79,10 +79,6 @@ GPR_PUBLIC_HDRS = [ "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 @@ grpc_cc_library( "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 8e0623b29f..eb620fb6d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -714,10 +714,6 @@ foreach(_hdr 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 @@ foreach(_hdr 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 @@ foreach(_hdr 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 @@ foreach(_hdr 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 @@ -2934,10 +2934,6 @@ PUBLIC_HEADERS_C += \ 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 @@ PUBLIC_HEADERS_CXX += \ 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 @@ PUBLIC_HEADERS_CXX += \ 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 @@ PUBLIC_HEADERS_CXX += \ 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 6b7b65e390..3427641aa5 100644 --- a/build.yaml +++ b/build.yaml @@ -96,10 +96,6 @@ filegroups: - 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 @@ filegroups: - 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 9121741602..fa6bb73a22 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -214,6 +214,10 @@ Pod::Spec.new do |s| '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 @@ Pod::Spec.new do |s| '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 87821145c8..5c3a1266b1 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -127,10 +127,6 @@ Pod::Spec.new do |s| '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 @@ Pod::Spec.new do |s| '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 @@ Pod::Spec.new do |s| '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 d6aea15fca..66bd9fda44 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -62,10 +62,6 @@ Gem::Specification.new do |s| 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 @@ Gem::Specification.new do |s| 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 4f6bf6c9bd..9e1695705c 100644 --- a/include/grpc/module.modulemap +++ b/include/grpc/module.modulemap @@ -14,7 +14,6 @@ framework module grpc { 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 @@ framework module grpc { 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 23a4ac1e07..6883b72d43 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 052b047f43..6ba0d2f745 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 index 4c9e79b6cf..aee8f4d941 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 index b44f0f1c8c..14c59eca55 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 @@ struct gpr_gcc_thread_local { #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 index 68a411f5d4..a6cc4174be 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 @@ struct gpr_msvc_thread_local { #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 ebeef2a8c2..2e5b306909 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 index 249c8b16f8..9202653dcb 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 @@ intptr_t gpr_tls_set(struct gpr_pthread_thread_local* tls, intptr_t value); } #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 1ef70d2f80..b7b5662922 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 30c7a89824..cd5a410545 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 c8954894ec..416447f3da 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 8ccc256222..5284fb4104 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 2e71482fb7..3d9a157627 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 835dc9d0f7..30157e3d1d 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 177bdec8df..015142fa91 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 8362522fa1..a2c52082c2 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 743b10f090..1ef253ed6f 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 61b80aebb8..be2a5b7671 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 44cd81a6a4..482f0cb24f 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 bf739857ff..8d3d013349 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -922,10 +922,6 @@ include/grpc/support/sync_posix.h \ 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 3db9bdfae0..5729aaad68 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -923,10 +923,6 @@ include/grpc/support/sync_posix.h \ 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.h \ 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 35f925d32a..3b7bd3a11f 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -862,10 +862,6 @@ include/grpc/support/sync_posix.h \ 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 4b65dd60a5..3d867606d3 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -862,10 +862,6 @@ include/grpc/support/sync_posix.h \ 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_posix.cc \ 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 cc19cc53f6..7661a23c3b 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", |