diff options
Diffstat (limited to 'src/core/lib/transport/connectivity_state.cc')
-rw-r--r-- | src/core/lib/transport/connectivity_state.cc | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/core/lib/transport/connectivity_state.cc b/src/core/lib/transport/connectivity_state.cc index bdaf0243f9..0da9165b8d 100644 --- a/src/core/lib/transport/connectivity_state.cc +++ b/src/core/lib/transport/connectivity_state.cc @@ -52,8 +52,7 @@ void grpc_connectivity_state_init(grpc_connectivity_state_tracker* tracker, tracker->name = gpr_strdup(name); } -void grpc_connectivity_state_destroy(grpc_exec_ctx* exec_ctx, - grpc_connectivity_state_tracker* tracker) { +void grpc_connectivity_state_destroy(grpc_connectivity_state_tracker* tracker) { grpc_error* error; grpc_connectivity_state_watcher* w; while ((w = tracker->watchers)) { @@ -66,7 +65,7 @@ void grpc_connectivity_state_destroy(grpc_exec_ctx* exec_ctx, error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Shutdown connectivity owner"); } - GRPC_CLOSURE_SCHED(exec_ctx, w->notify, error); + GRPC_CLOSURE_SCHED(w->notify, error); gpr_free(w); } GRPC_ERROR_UNREF(tracker->current_error); @@ -106,8 +105,8 @@ bool grpc_connectivity_state_has_watchers( } bool grpc_connectivity_state_notify_on_state_change( - grpc_exec_ctx* exec_ctx, grpc_connectivity_state_tracker* tracker, - grpc_connectivity_state* current, grpc_closure* notify) { + grpc_connectivity_state_tracker* tracker, grpc_connectivity_state* current, + grpc_closure* notify) { grpc_connectivity_state cur = (grpc_connectivity_state)gpr_atm_no_barrier_load( &tracker->current_state_atm); @@ -124,7 +123,7 @@ bool grpc_connectivity_state_notify_on_state_change( if (current == NULL) { grpc_connectivity_state_watcher* w = tracker->watchers; if (w != NULL && w->notify == notify) { - GRPC_CLOSURE_SCHED(exec_ctx, notify, GRPC_ERROR_CANCELLED); + GRPC_CLOSURE_SCHED(notify, GRPC_ERROR_CANCELLED); tracker->watchers = w->next; gpr_free(w); return false; @@ -132,7 +131,7 @@ bool grpc_connectivity_state_notify_on_state_change( while (w != NULL) { grpc_connectivity_state_watcher* rm_candidate = w->next; if (rm_candidate != NULL && rm_candidate->notify == notify) { - GRPC_CLOSURE_SCHED(exec_ctx, notify, GRPC_ERROR_CANCELLED); + GRPC_CLOSURE_SCHED(notify, GRPC_ERROR_CANCELLED); w->next = w->next->next; gpr_free(rm_candidate); return false; @@ -143,8 +142,7 @@ bool grpc_connectivity_state_notify_on_state_change( } else { if (cur != *current) { *current = cur; - GRPC_CLOSURE_SCHED(exec_ctx, notify, - GRPC_ERROR_REF(tracker->current_error)); + GRPC_CLOSURE_SCHED(notify, GRPC_ERROR_REF(tracker->current_error)); } else { grpc_connectivity_state_watcher* w = (grpc_connectivity_state_watcher*)gpr_malloc(sizeof(*w)); @@ -157,8 +155,7 @@ bool grpc_connectivity_state_notify_on_state_change( } } -void grpc_connectivity_state_set(grpc_exec_ctx* exec_ctx, - grpc_connectivity_state_tracker* tracker, +void grpc_connectivity_state_set(grpc_connectivity_state_tracker* tracker, grpc_connectivity_state state, grpc_error* error, const char* reason) { grpc_connectivity_state cur = @@ -196,8 +193,7 @@ void grpc_connectivity_state_set(grpc_exec_ctx* exec_ctx, gpr_log(GPR_DEBUG, "NOTIFY: %p %s: %p", tracker, tracker->name, w->notify); } - GRPC_CLOSURE_SCHED(exec_ctx, w->notify, - GRPC_ERROR_REF(tracker->current_error)); + GRPC_CLOSURE_SCHED(w->notify, GRPC_ERROR_REF(tracker->current_error)); gpr_free(w); } } |