diff options
author | 2017-12-05 21:19:52 -0800 | |
---|---|---|
committer | 2017-12-05 21:19:52 -0800 | |
commit | a3df36cc2505a89c2f481eea4a66a87b3002844a (patch) | |
tree | 72385cc865094115bc08cb813201d48cb09840bb /src/core/lib/channel/channel_stack.h | |
parent | 9dbb6e3a28ae9c5ed3c97913c4c363b15eb7b2cc (diff) | |
parent | 73bb67d054ecb952f10649cc42c998ab7ea8facd (diff) |
Merge pull request #13058 from yashykt/execctx
All instances of exec_ctx being passed around in src/core removed
Diffstat (limited to 'src/core/lib/channel/channel_stack.h')
-rw-r--r-- | src/core/lib/channel/channel_stack.h | 64 |
1 files changed, 26 insertions, 38 deletions
diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 1b6e5396a5..716866be26 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -96,14 +96,12 @@ typedef struct { typedef struct { /* Called to eg. send/receive data on a call. See grpc_call_next_op on how to call the next element in the stack */ - void (*start_transport_stream_op_batch)(grpc_exec_ctx* exec_ctx, - grpc_call_element* elem, + void (*start_transport_stream_op_batch)(grpc_call_element* elem, grpc_transport_stream_op_batch* op); /* Called to handle channel level operations - e.g. new calls, or transport closure. See grpc_channel_next_op on how to call the next element in the stack */ - void (*start_transport_op)(grpc_exec_ctx* exec_ctx, - grpc_channel_element* elem, grpc_transport_op* op); + void (*start_transport_op)(grpc_channel_element* elem, grpc_transport_op* op); /* sizeof(per call data) */ size_t sizeof_call_data; @@ -116,11 +114,9 @@ typedef struct { transport and is on the server. Most filters want to ignore this argument. Implementations may assume that elem->call_data is all zeros. */ - grpc_error* (*init_call_elem)(grpc_exec_ctx* exec_ctx, - grpc_call_element* elem, + grpc_error* (*init_call_elem)(grpc_call_element* elem, const grpc_call_element_args* args); - void (*set_pollset_or_pollset_set)(grpc_exec_ctx* exec_ctx, - grpc_call_element* elem, + void (*set_pollset_or_pollset_set)(grpc_call_element* elem, grpc_polling_entity* pollent); /* Destroy per call data. The filter does not need to do any chaining. @@ -128,7 +124,7 @@ typedef struct { \a then_schedule_closure that should be passed to GRPC_CLOSURE_SCHED when destruction is complete. \a final_info contains data about the completed call, mainly for reporting purposes. */ - void (*destroy_call_elem)(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, + void (*destroy_call_elem)(grpc_call_element* elem, const grpc_call_final_info* final_info, grpc_closure* then_schedule_closure); @@ -141,16 +137,14 @@ typedef struct { useful for asserting correct configuration by upper layer code. The filter does not need to do any chaining. Implementations may assume that elem->call_data is all zeros. */ - grpc_error* (*init_channel_elem)(grpc_exec_ctx* exec_ctx, - grpc_channel_element* elem, + grpc_error* (*init_channel_elem)(grpc_channel_element* elem, grpc_channel_element_args* args); /* Destroy per channel data. The filter does not need to do any chaining */ - void (*destroy_channel_elem)(grpc_exec_ctx* exec_ctx, - grpc_channel_element* elem); + void (*destroy_channel_elem)(grpc_channel_element* elem); /* Implement grpc_channel_get_info() */ - void (*get_channel_info)(grpc_exec_ctx* exec_ctx, grpc_channel_element* elem, + void (*get_channel_info)(grpc_channel_element* elem, const grpc_channel_info* channel_info); /* The name of this filter */ @@ -208,68 +202,62 @@ size_t grpc_channel_stack_size(const grpc_channel_filter** filters, size_t filter_count); /* Initialize a channel stack given some filters */ grpc_error* grpc_channel_stack_init( - grpc_exec_ctx* exec_ctx, int initial_refs, grpc_iomgr_cb_func destroy, - void* destroy_arg, const grpc_channel_filter** filters, size_t filter_count, + int initial_refs, grpc_iomgr_cb_func destroy, void* destroy_arg, + const grpc_channel_filter** filters, size_t filter_count, const grpc_channel_args* args, grpc_transport* optional_transport, const char* name, grpc_channel_stack* stack); /* Destroy a channel stack */ -void grpc_channel_stack_destroy(grpc_exec_ctx* exec_ctx, - grpc_channel_stack* stack); +void grpc_channel_stack_destroy(grpc_channel_stack* stack); /* Initialize a call stack given a channel stack. transport_server_data is expected to be NULL on a client, or an opaque transport owned pointer on the server. */ -grpc_error* grpc_call_stack_init(grpc_exec_ctx* exec_ctx, - grpc_channel_stack* channel_stack, +grpc_error* grpc_call_stack_init(grpc_channel_stack* channel_stack, int initial_refs, grpc_iomgr_cb_func destroy, void* destroy_arg, const grpc_call_element_args* elem_args); /* Set a pollset or a pollset_set for a call stack: must occur before the first * op is started */ -void grpc_call_stack_set_pollset_or_pollset_set(grpc_exec_ctx* exec_ctx, - grpc_call_stack* call_stack, +void grpc_call_stack_set_pollset_or_pollset_set(grpc_call_stack* call_stack, grpc_polling_entity* pollent); #ifndef NDEBUG #define GRPC_CALL_STACK_REF(call_stack, reason) \ grpc_stream_ref(&(call_stack)->refcount, reason) -#define GRPC_CALL_STACK_UNREF(exec_ctx, call_stack, reason) \ - grpc_stream_unref(exec_ctx, &(call_stack)->refcount, reason) +#define GRPC_CALL_STACK_UNREF(call_stack, reason) \ + grpc_stream_unref(&(call_stack)->refcount, reason) #define GRPC_CHANNEL_STACK_REF(channel_stack, reason) \ grpc_stream_ref(&(channel_stack)->refcount, reason) -#define GRPC_CHANNEL_STACK_UNREF(exec_ctx, channel_stack, reason) \ - grpc_stream_unref(exec_ctx, &(channel_stack)->refcount, reason) +#define GRPC_CHANNEL_STACK_UNREF(channel_stack, reason) \ + grpc_stream_unref(&(channel_stack)->refcount, reason) #else #define GRPC_CALL_STACK_REF(call_stack, reason) \ grpc_stream_ref(&(call_stack)->refcount) -#define GRPC_CALL_STACK_UNREF(exec_ctx, call_stack, reason) \ - grpc_stream_unref(exec_ctx, &(call_stack)->refcount) +#define GRPC_CALL_STACK_UNREF(call_stack, reason) \ + grpc_stream_unref(&(call_stack)->refcount) #define GRPC_CHANNEL_STACK_REF(channel_stack, reason) \ grpc_stream_ref(&(channel_stack)->refcount) -#define GRPC_CHANNEL_STACK_UNREF(exec_ctx, channel_stack, reason) \ - grpc_stream_unref(exec_ctx, &(channel_stack)->refcount) +#define GRPC_CHANNEL_STACK_UNREF(channel_stack, reason) \ + grpc_stream_unref(&(channel_stack)->refcount) #endif /* Destroy a call stack */ -void grpc_call_stack_destroy(grpc_exec_ctx* exec_ctx, grpc_call_stack* stack, +void grpc_call_stack_destroy(grpc_call_stack* stack, const grpc_call_final_info* final_info, grpc_closure* then_schedule_closure); /* Ignore set pollset{_set} - used by filters if they don't care about pollsets * at all. Does nothing. */ void grpc_call_stack_ignore_set_pollset_or_pollset_set( - grpc_exec_ctx* exec_ctx, grpc_call_element* elem, - grpc_polling_entity* pollent); + grpc_call_element* elem, grpc_polling_entity* pollent); /* Call the next operation in a call stack */ -void grpc_call_next_op(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, +void grpc_call_next_op(grpc_call_element* elem, grpc_transport_stream_op_batch* op); /* Call the next operation (depending on call directionality) in a channel stack */ -void grpc_channel_next_op(grpc_exec_ctx* exec_ctx, grpc_channel_element* elem, - grpc_transport_op* op); +void grpc_channel_next_op(grpc_channel_element* elem, grpc_transport_op* op); /* Pass through a request to get_channel_info() to the next child element */ -void grpc_channel_next_get_info(grpc_exec_ctx* exec_ctx, - grpc_channel_element* elem, +void grpc_channel_next_get_info(grpc_channel_element* elem, const grpc_channel_info* channel_info); /* Given the top element of a channel stack, get the channel stack itself */ |