diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-12-06 09:05:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-06 09:05:05 -0800 |
commit | ad4d2dde0052efbbf49d64b0843c45f0381cfeb3 (patch) | |
tree | 6a657f8c6179d873b34505cdc24bce9462ca68eb /include | |
parent | a3df36cc2505a89c2f481eea4a66a87b3002844a (diff) |
Revert "All instances of exec_ctx being passed around in src/core removed"
Diffstat (limited to 'include')
-rw-r--r-- | include/grpc++/support/channel_arguments.h | 2 | ||||
-rw-r--r-- | include/grpc/impl/codegen/grpc_types.h | 2 | ||||
-rw-r--r-- | include/grpc/impl/codegen/slice.h | 2 | ||||
-rw-r--r-- | include/grpc/slice_buffer.h | 3 | ||||
-rw-r--r-- | include/grpc/support/tls.h | 6 | ||||
-rw-r--r-- | include/grpc/support/tls_gcc.h | 5 | ||||
-rw-r--r-- | include/grpc/support/tls_msvc.h | 9 | ||||
-rw-r--r-- | include/grpc/support/tls_pthread.h | 9 |
8 files changed, 5 insertions, 33 deletions
diff --git a/include/grpc++/support/channel_arguments.h b/include/grpc++/support/channel_arguments.h index c9879d8a28..9dc505f008 100644 --- a/include/grpc++/support/channel_arguments.h +++ b/include/grpc++/support/channel_arguments.h @@ -122,7 +122,7 @@ class ChannelArguments { /// Default pointer argument operations. struct PointerVtableMembers { static void* Copy(void* in) { return in; } - static void Destroy(void* in) {} + static void Destroy(grpc_exec_ctx* exec_ctx, void* in) {} static int Compare(void* a, void* b) { if (a < b) return -1; if (a > b) return 1; diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index fcbc8ac5a1..77844aa2af 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -85,7 +85,7 @@ typedef enum { typedef struct grpc_arg_pointer_vtable { void* (*copy)(void* p); - void (*destroy)(void* p); + void (*destroy)(grpc_exec_ctx* exec_ctx, void* p); int (*cmp)(void* p, void* q); } grpc_arg_pointer_vtable; diff --git a/include/grpc/impl/codegen/slice.h b/include/grpc/impl/codegen/slice.h index ad026b685e..11997fcb56 100644 --- a/include/grpc/impl/codegen/slice.h +++ b/include/grpc/impl/codegen/slice.h @@ -43,7 +43,7 @@ typedef struct grpc_slice grpc_slice; typedef struct grpc_slice_refcount_vtable { void (*ref)(void*); - void (*unref)(void*); + void (*unref)(grpc_exec_ctx* exec_ctx, void*); int (*eq)(grpc_slice a, grpc_slice b); uint32_t (*hash)(grpc_slice slice); } grpc_slice_refcount_vtable; diff --git a/include/grpc/slice_buffer.h b/include/grpc/slice_buffer.h index 30833d02db..6510c151b3 100644 --- a/include/grpc/slice_buffer.h +++ b/include/grpc/slice_buffer.h @@ -67,7 +67,8 @@ GPRAPI void grpc_slice_buffer_move_first_no_ref(grpc_slice_buffer* src, size_t n, grpc_slice_buffer* dst); /** move the first n bytes of src into dst (copying them) */ -GPRAPI void grpc_slice_buffer_move_first_into_buffer(grpc_slice_buffer* src, +GPRAPI void grpc_slice_buffer_move_first_into_buffer(grpc_exec_ctx* exec_ctx, + grpc_slice_buffer* src, size_t n, void* dst); /** take the first slice in the slice buffer */ GPRAPI grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer* src); diff --git a/include/grpc/support/tls.h b/include/grpc/support/tls.h index 4c9e79b6cf..8519a8350b 100644 --- a/include/grpc/support/tls.h +++ b/include/grpc/support/tls.h @@ -32,12 +32,6 @@ GPR_TLS_DECL(foo); Thread locals always have static scope. - Declaring a thread local class variable 'foo': - GPR_TLS_CLASS_DECL(foo); - - Defining the thread local class variable: - GPR_TLS_CLASS_DEF(foo); - Initializing a thread local (must be done at library initialization time): gpr_tls_init(&foo); diff --git a/include/grpc/support/tls_gcc.h b/include/grpc/support/tls_gcc.h index b44f0f1c8c..1b91d22be1 100644 --- a/include/grpc/support/tls_gcc.h +++ b/include/grpc/support/tls_gcc.h @@ -33,11 +33,6 @@ struct gpr_gcc_thread_local { #define GPR_TLS_DECL(name) \ static __thread struct gpr_gcc_thread_local name = {0} -#define GPR_TLS_CLASS_DECL(name) \ - static __thread struct gpr_gcc_thread_local name - -#define GPR_TLS_CLASS_DEF(name) __thread struct gpr_gcc_thread_local name = {0} - #define gpr_tls_init(tls) \ do { \ } while (0) diff --git a/include/grpc/support/tls_msvc.h b/include/grpc/support/tls_msvc.h index 68a411f5d4..e5f2205fc1 100644 --- a/include/grpc/support/tls_msvc.h +++ b/include/grpc/support/tls_msvc.h @@ -26,18 +26,9 @@ struct gpr_msvc_thread_local { intptr_t value; }; -/** Use GPR_TLS_DECL to declare tls static variables outside a class */ #define GPR_TLS_DECL(name) \ static __declspec(thread) struct gpr_msvc_thread_local name = {0} -/** Use GPR_TLS_CLASS_DECL to declare tls static variable members of a class. - * GPR_TLS_CLASS_DEF needs to be called to define this member. */ -#define GPR_TLS_CLASS_DECL(name) \ - static __declspec(thread) struct gpr_msvc_thread_local name - -#define GPR_TLS_CLASS_DEF(name) \ - __declspec(thread) struct gpr_msvc_thread_local name = {0} - #define gpr_tls_init(tls) \ do { \ } while (0) diff --git a/include/grpc/support/tls_pthread.h b/include/grpc/support/tls_pthread.h index 249c8b16f8..fb0edd8e74 100644 --- a/include/grpc/support/tls_pthread.h +++ b/include/grpc/support/tls_pthread.h @@ -29,17 +29,8 @@ struct gpr_pthread_thread_local { pthread_key_t key; }; -/** Use GPR_TLS_DECL to declare tls static variables outside a class */ #define GPR_TLS_DECL(name) static struct gpr_pthread_thread_local name = {0} -/** Use GPR_TLS_CLASS_DECL to declare tls static variable members of a class. - * GPR_TLS_CLASS_DEF needs to be called to define this member. */ -#define GPR_TLS_CLASS_DECL(name) static struct gpr_pthread_thread_local name - -/** Use GPR_TLS_CLASS_DEF to declare tls static variable members of a class. - * GPR_TLS_CLASS_DEF needs to be called to define this member. */ -#define GPR_TLS_CLASS_DEF(name) struct gpr_pthread_thread_local name = {0} - #define gpr_tls_init(tls) GPR_ASSERT(0 == pthread_key_create(&(tls)->key, NULL)) #define gpr_tls_destroy(tls) pthread_key_delete((tls)->key) #define gpr_tls_get(tls) ((intptr_t)pthread_getspecific((tls)->key)) |