diff options
Diffstat (limited to 'src')
26 files changed, 103 insertions, 92 deletions
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/src/core/lib/gpr/thd.h b/src/core/lib/gpr/thd.h new file mode 100644 index 0000000000..58ce0d0088 --- /dev/null +++ b/src/core/lib/gpr/thd.h @@ -0,0 +1,71 @@ +/* + * + * Copyright 2015 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPC_CORE_LIB_GPR_THD_H +#define GRPC_CORE_LIB_GPR_THD_H +/** Internal thread interface for GPR. + + Types + gpr_thd_options options used when creating a thread + */ + +#include <grpc/support/port_platform.h> +#include <grpc/support/thd_id.h> +#include <grpc/support/time.h> + +/** Thread creation options. */ +typedef struct { + int flags; /** Opaque field. Get and set with accessors below. */ +} gpr_thd_options; + +/** Create a new thread running (*thd_body)(arg) and place its thread identifier + in *t, and return true. If there are insufficient resources, return false. + thd_name is the name of the thread for identification purposes on platforms + that support thread naming. + If options==NULL, default options are used. + The thread is immediately runnable, and exits when (*thd_body)() returns. */ +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. */ +gpr_thd_options gpr_thd_options_default(void); + +/** Set the thread to become detached on startup - this is the default. */ +void gpr_thd_options_set_detached(gpr_thd_options* options); + +/** Set the thread to become joinable - mutually exclusive with detached. */ +void gpr_thd_options_set_joinable(gpr_thd_options* options); + +/** Returns non-zero if the option detached is set. */ +int gpr_thd_options_is_detached(const gpr_thd_options* options); + +/** Returns non-zero if the option joinable is set. */ +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. */ +void gpr_thd_join(gpr_thd_id t); + +/* Internal interfaces between modules within the gpr support library. */ +void gpr_thd_init(); + +/* Wait for all outstanding threads to finish, up to deadline */ +int gpr_await_threads(gpr_timespec deadline); + +#endif /* GRPC_CORE_LIB_GPR_THD_H */ diff --git a/src/core/lib/gpr/thd_internal.h b/src/core/lib/gpr/thd_internal.h deleted file mode 100644 index 692c00c8e1..0000000000 --- a/src/core/lib/gpr/thd_internal.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * Copyright 2015 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef GRPC_CORE_LIB_GPR_THD_INTERNAL_H -#define GRPC_CORE_LIB_GPR_THD_INTERNAL_H - -#include <grpc/support/time.h> - -/* Internal interfaces between modules within the gpr support library. */ -void gpr_thd_init(); - -/* Wait for all outstanding threads to finish, up to deadline */ -int gpr_await_threads(gpr_timespec deadline); - -#endif /* GRPC_CORE_LIB_GPR_THD_INTERNAL_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 |