aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/core/channel/client_channel.c6
-rw-r--r--src/core/client_config/lb_policies/pick_first.c8
-rw-r--r--src/core/client_config/lb_policies/round_robin.c6
-rw-r--r--src/core/client_config/resolvers/dns_resolver.c4
-rw-r--r--src/core/client_config/resolvers/sockaddr_resolver.c4
-rw-r--r--src/core/client_config/subchannel.c2
-rw-r--r--src/core/iomgr/alarm.c4
-rw-r--r--src/core/iomgr/fd_posix.c8
-rw-r--r--src/core/iomgr/pollset_multipoller_with_epoll.c4
-rw-r--r--src/core/iomgr/pollset_posix.c4
-rw-r--r--src/core/iomgr/tcp_client_posix.c8
-rw-r--r--src/core/iomgr/tcp_posix.c6
-rw-r--r--src/core/iomgr/tcp_server_posix.c2
-rw-r--r--src/core/iomgr/udp_server.c2
-rw-r--r--src/core/security/secure_endpoint.c4
-rw-r--r--src/core/surface/server.c12
-rw-r--r--src/core/transport/chttp2/frame_ping.c2
-rw-r--r--src/core/transport/chttp2/writing.c2
-rw-r--r--src/core/transport/chttp2_transport.c14
-rw-r--r--src/core/transport/connectivity_state.c6
-rw-r--r--src/core/transport/transport.c6
21 files changed, 57 insertions, 57 deletions
diff --git a/src/core/channel/client_channel.c b/src/core/channel/client_channel.c
index 9a7c1c77ca..ecb6c219ac 100644
--- a/src/core/channel/client_channel.c
+++ b/src/core/channel/client_channel.c
@@ -366,7 +366,7 @@ perform_transport_stream_op (grpc_exec_ctx * exec_ctx, grpc_call_element * elem,
break;
case CALL_WAITING_FOR_SEND:
GPR_ASSERT (!continuation);
- grpc_closure_list_add (closure_list, merge_into_waiting_op (elem, op), 1);
+ grpc_exec_ctx_enqueue (exec_ctx, merge_into_waiting_op (elem, op), 1);
if (!calld->waiting_op.send_ops && calld->waiting_op.cancel_with_status == GRPC_STATUS_OK)
{
gpr_mu_unlock (&calld->mu_state);
@@ -402,7 +402,7 @@ perform_transport_stream_op (grpc_exec_ctx * exec_ctx, grpc_call_element * elem,
}
else
{
- grpc_closure_list_add (closure_list, merge_into_waiting_op (elem, op), 1);
+ grpc_exec_ctx_enqueue (exec_ctx, merge_into_waiting_op (elem, op), 1);
gpr_mu_unlock (&calld->mu_state);
}
break;
@@ -617,7 +617,7 @@ cc_start_transport_op (grpc_exec_ctx * exec_ctx, grpc_channel_element * elem, gr
channel_data *chand = elem->channel_data;
grpc_resolver *destroy_resolver = NULL;
- grpc_closure_list_add (closure_list, op->on_consumed, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, op->on_consumed, 1);
GPR_ASSERT (op->set_accept_stream == NULL);
GPR_ASSERT (op->bind_pollset == NULL);
diff --git a/src/core/client_config/lb_policies/pick_first.c b/src/core/client_config/lb_policies/pick_first.c
index c07cc81b27..75e6c01839 100644
--- a/src/core/client_config/lb_policies/pick_first.c
+++ b/src/core/client_config/lb_policies/pick_first.c
@@ -130,7 +130,7 @@ pf_shutdown (grpc_exec_ctx * exec_ctx, grpc_lb_policy * pol)
{
pending_pick *next = pp->next;
*pp->target = NULL;
- grpc_closure_list_add (closure_list, pp->on_complete, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, pp->on_complete, 1);
gpr_free (pp);
pp = next;
}
@@ -168,7 +168,7 @@ pf_pick (grpc_exec_ctx * exec_ctx, grpc_lb_policy * pol, grpc_pollset * pollset,
{
gpr_mu_unlock (&p->mu);
*target = p->selected;
- grpc_closure_list_add (closure_list, on_complete, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, on_complete, 1);
}
else
{
@@ -226,7 +226,7 @@ pf_connectivity_changed (grpc_exec_ctx * exec_ctx, void *arg, int iomgr_success)
p->pending_picks = pp->next;
*pp->target = p->selected;
grpc_subchannel_del_interested_party (exec_ctx, p->selected, pp->pollset);
- grpc_closure_list_add (closure_list, pp->on_complete, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, pp->on_complete, 1);
gpr_free (pp);
}
grpc_subchannel_notify_on_state_change (exec_ctx, p->selected, &p->checking_connectivity, &p->connectivity_changed);
@@ -263,7 +263,7 @@ pf_connectivity_changed (grpc_exec_ctx * exec_ctx, void *arg, int iomgr_success)
{
p->pending_picks = pp->next;
*pp->target = NULL;
- grpc_closure_list_add (closure_list, pp->on_complete, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, pp->on_complete, 1);
gpr_free (pp);
}
GRPC_LB_POLICY_UNREF (exec_ctx, &p->base, "pick_first_connectivity");
diff --git a/src/core/client_config/lb_policies/round_robin.c b/src/core/client_config/lb_policies/round_robin.c
index b745628bbc..5f8976396b 100644
--- a/src/core/client_config/lb_policies/round_robin.c
+++ b/src/core/client_config/lb_policies/round_robin.c
@@ -292,7 +292,7 @@ rr_shutdown (grpc_exec_ctx * exec_ctx, grpc_lb_policy * pol)
{
p->pending_picks = pp->next;
*pp->target = NULL;
- grpc_closure_list_add (closure_list, pp->on_complete, 0);
+ grpc_exec_ctx_enqueue (exec_ctx, pp->on_complete, 0);
gpr_free (pp);
}
grpc_connectivity_state_set (exec_ctx, &p->state_tracker, GRPC_CHANNEL_FATAL_FAILURE, "shutdown");
@@ -416,7 +416,7 @@ rr_connectivity_changed (grpc_exec_ctx * exec_ctx, void *arg, int iomgr_success)
gpr_log (GPR_DEBUG, "[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (NODE %p)", selected->subchannel, selected);
}
grpc_subchannel_del_interested_party (exec_ctx, selected->subchannel, pp->pollset);
- grpc_closure_list_add (closure_list, pp->on_complete, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, pp->on_complete, 1);
gpr_free (pp);
}
grpc_subchannel_notify_on_state_change (exec_ctx, p->subchannels[this_idx], this_connectivity, &p->connectivity_changed_cbs[this_idx]);
@@ -458,7 +458,7 @@ rr_connectivity_changed (grpc_exec_ctx * exec_ctx, void *arg, int iomgr_success)
{
p->pending_picks = pp->next;
*pp->target = NULL;
- grpc_closure_list_add (closure_list, pp->on_complete, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, pp->on_complete, 1);
gpr_free (pp);
}
unref = 1;
diff --git a/src/core/client_config/resolvers/dns_resolver.c b/src/core/client_config/resolvers/dns_resolver.c
index 781f1a9e23..dc8151311a 100644
--- a/src/core/client_config/resolvers/dns_resolver.c
+++ b/src/core/client_config/resolvers/dns_resolver.c
@@ -96,7 +96,7 @@ dns_shutdown (grpc_exec_ctx * exec_ctx, grpc_resolver * resolver)
if (r->next_completion != NULL)
{
*r->target_config = NULL;
- grpc_closure_list_add (closure_list, r->next_completion, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, r->next_completion, 1);
r->next_completion = NULL;
}
gpr_mu_unlock (&r->mu);
@@ -197,7 +197,7 @@ dns_maybe_finish_next_locked (grpc_exec_ctx * exec_ctx, dns_resolver * r)
{
grpc_client_config_ref (r->resolved_config);
}
- grpc_closure_list_add (closure_list, r->next_completion, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, r->next_completion, 1);
r->next_completion = NULL;
r->published_version = r->resolved_version;
}
diff --git a/src/core/client_config/resolvers/sockaddr_resolver.c b/src/core/client_config/resolvers/sockaddr_resolver.c
index 1b2eac997d..f4c958c424 100644
--- a/src/core/client_config/resolvers/sockaddr_resolver.c
+++ b/src/core/client_config/resolvers/sockaddr_resolver.c
@@ -98,7 +98,7 @@ sockaddr_shutdown (grpc_exec_ctx * exec_ctx, grpc_resolver * resolver)
if (r->next_completion != NULL)
{
*r->target_config = NULL;
- grpc_closure_list_add (closure_list, r->next_completion, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, r->next_completion, 1);
r->next_completion = NULL;
}
gpr_mu_unlock (&r->mu);
@@ -151,7 +151,7 @@ sockaddr_maybe_finish_next_locked (grpc_exec_ctx * exec_ctx, sockaddr_resolver *
GRPC_LB_POLICY_UNREF (exec_ctx, lb_policy, "sockaddr");
r->published = 1;
*r->target_config = cfg;
- grpc_closure_list_add (closure_list, r->next_completion, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, r->next_completion, 1);
r->next_completion = NULL;
}
}
diff --git a/src/core/client_config/subchannel.c b/src/core/client_config/subchannel.c
index 3db2fae593..b0d71112d0 100644
--- a/src/core/client_config/subchannel.c
+++ b/src/core/client_config/subchannel.c
@@ -627,7 +627,7 @@ publish_transport (grpc_exec_ctx * exec_ctx, grpc_subchannel * c)
while (w4c != NULL)
{
waiting_for_connect *next = w4c->next;
- grpc_closure_list_add (closure_list, &w4c->continuation, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, &w4c->continuation, 1);
w4c = next;
}
diff --git a/src/core/iomgr/alarm.c b/src/core/iomgr/alarm.c
index 3110bd3cdf..6e56ccacf5 100644
--- a/src/core/iomgr/alarm.c
+++ b/src/core/iomgr/alarm.c
@@ -243,7 +243,7 @@ grpc_alarm_cancel (grpc_exec_ctx * exec_ctx, grpc_alarm * alarm)
gpr_mu_lock (&shard->mu);
if (!alarm->triggered)
{
- grpc_closure_list_add (closure_list, &alarm->closure, 0);
+ grpc_exec_ctx_enqueue (exec_ctx, &alarm->closure, 0);
alarm->triggered = 1;
if (alarm->heap_index == INVALID_HEAP_INDEX)
{
@@ -320,7 +320,7 @@ pop_alarms (grpc_exec_ctx * exec_ctx, shard_type * shard, gpr_timespec now, gpr_
gpr_mu_lock (&shard->mu);
while ((alarm = pop_one (shard, now)))
{
- grpc_closure_list_add (closure_list, &alarm->closure, success);
+ grpc_exec_ctx_enqueue (exec_ctx, &alarm->closure, success);
n++;
}
*new_min_deadline = compute_min_deadline (shard);
diff --git a/src/core/iomgr/fd_posix.c b/src/core/iomgr/fd_posix.c
index fb4e99605d..27936455c6 100644
--- a/src/core/iomgr/fd_posix.c
+++ b/src/core/iomgr/fd_posix.c
@@ -262,7 +262,7 @@ grpc_fd_orphan (grpc_exec_ctx * exec_ctx, grpc_fd * fd, grpc_closure * on_done,
{
fd->closed = 1;
close (fd->fd);
- grpc_closure_list_add (closure_list, fd->on_done_closure, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, fd->on_done_closure, 1);
}
else
{
@@ -325,7 +325,7 @@ notify_on (grpc_exec_ctx * exec_ctx, grpc_fd * fd, gpr_atm * st, grpc_closure *
case READY:
GPR_ASSERT (gpr_atm_no_barrier_load (st) == READY);
gpr_atm_rel_store (st, NOT_READY);
- grpc_closure_list_add (closure_list, closure, !gpr_atm_acq_load (&fd->shutdown));
+ grpc_exec_ctx_enqueue (exec_ctx, closure, !gpr_atm_acq_load (&fd->shutdown));
return;
default: /* WAITING */
/* upcallptr was set to a different closure. This is an error! */
@@ -358,7 +358,7 @@ set_ready_locked (grpc_exec_ctx * exec_ctx, grpc_fd * fd, gpr_atm * st)
state = gpr_atm_acq_load (st);
default: /* waiting */
GPR_ASSERT (gpr_atm_no_barrier_load (st) != READY && gpr_atm_no_barrier_load (st) != NOT_READY);
- grpc_closure_list_add (closure_list, (grpc_closure *) state, !gpr_atm_acq_load (&fd->shutdown));
+ grpc_exec_ctx_enqueue (exec_ctx, (grpc_closure *) state, !gpr_atm_acq_load (&fd->shutdown));
gpr_atm_rel_store (st, NOT_READY);
return;
}
@@ -483,7 +483,7 @@ grpc_fd_end_poll (grpc_exec_ctx * exec_ctx, grpc_fd_watcher * watcher, int got_r
{
fd->closed = 1;
close (fd->fd);
- grpc_closure_list_add (closure_list, fd->on_done_closure, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, fd->on_done_closure, 1);
}
gpr_mu_unlock (&fd->watcher_mu);
diff --git a/src/core/iomgr/pollset_multipoller_with_epoll.c b/src/core/iomgr/pollset_multipoller_with_epoll.c
index a9ee5a4574..c62a786cf6 100644
--- a/src/core/iomgr/pollset_multipoller_with_epoll.c
+++ b/src/core/iomgr/pollset_multipoller_with_epoll.c
@@ -111,7 +111,7 @@ perform_delayed_add (grpc_exec_ctx * exec_ctx, void *arg, int iomgr_status)
if (da->pollset->in_flight_cbs == 0 && !da->pollset->called_shutdown)
{
da->pollset->called_shutdown = 1;
- grpc_closure_list_add (closure_list, da->pollset->shutdown_done, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, da->pollset->shutdown_done, 1);
}
}
gpr_mu_unlock (&da->pollset->mu);
@@ -137,7 +137,7 @@ multipoll_with_epoll_pollset_add_fd (grpc_exec_ctx * exec_ctx, grpc_pollset * po
GRPC_FD_REF (fd, "delayed_add");
grpc_closure_init (&da->closure, perform_delayed_add, da);
pollset->in_flight_cbs++;
- grpc_closure_list_add (closure_list, &da->closure, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, &da->closure, 1);
}
}
diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c
index c15b1f1908..2f08dd0f70 100644
--- a/src/core/iomgr/pollset_posix.c
+++ b/src/core/iomgr/pollset_posix.c
@@ -202,7 +202,7 @@ static void
finish_shutdown (grpc_exec_ctx * exec_ctx, grpc_pollset * pollset)
{
pollset->vtable->finish_shutdown (pollset);
- grpc_closure_list_add (closure_list, pollset->shutdown_done, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, pollset->shutdown_done, 1);
}
void
@@ -378,7 +378,7 @@ basic_do_promote (grpc_exec_ctx * exec_ctx, void *args, int success)
{
GPR_ASSERT (!grpc_pollset_has_workers (pollset));
pollset->called_shutdown = 1;
- grpc_closure_list_add (closure_list, pollset->shutdown_done, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, pollset->shutdown_done, 1);
}
}
else if (grpc_fd_is_orphaned (fd))
diff --git a/src/core/iomgr/tcp_client_posix.c b/src/core/iomgr/tcp_client_posix.c
index 69384ef484..e3cecd3a36 100644
--- a/src/core/iomgr/tcp_client_posix.c
+++ b/src/core/iomgr/tcp_client_posix.c
@@ -225,7 +225,7 @@ finish:
gpr_free (ac->addr_str);
gpr_free (ac);
}
- grpc_closure_list_add (closure_list, closure, *ep != NULL);
+ grpc_exec_ctx_enqueue (exec_ctx, closure, *ep != NULL);
}
void
@@ -264,7 +264,7 @@ grpc_tcp_client_connect (grpc_exec_ctx * exec_ctx, grpc_closure * closure, grpc_
}
if (!prepare_socket (addr, fd))
{
- grpc_closure_list_add (closure_list, closure, 0);
+ grpc_exec_ctx_enqueue (exec_ctx, closure, 0);
return;
}
@@ -283,7 +283,7 @@ grpc_tcp_client_connect (grpc_exec_ctx * exec_ctx, grpc_closure * closure, grpc_
if (err >= 0)
{
*ep = grpc_tcp_create (fdobj, GRPC_TCP_DEFAULT_READ_SLICE_SIZE, addr_str);
- grpc_closure_list_add (closure_list, closure, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, closure, 1);
goto done;
}
@@ -291,7 +291,7 @@ grpc_tcp_client_connect (grpc_exec_ctx * exec_ctx, grpc_closure * closure, grpc_
{
gpr_log (GPR_ERROR, "connect error to '%s': %s", addr_str, strerror (errno));
grpc_fd_orphan (exec_ctx, fdobj, NULL, "tcp_client_connect_error");
- grpc_closure_list_add (closure_list, closure, 0);
+ grpc_exec_ctx_enqueue (exec_ctx, closure, 0);
goto done;
}
diff --git a/src/core/iomgr/tcp_posix.c b/src/core/iomgr/tcp_posix.c
index 66895f3744..b24bc2e11e 100644
--- a/src/core/iomgr/tcp_posix.c
+++ b/src/core/iomgr/tcp_posix.c
@@ -307,7 +307,7 @@ tcp_read (grpc_exec_ctx * exec_ctx, grpc_endpoint * ep, gpr_slice_buffer * incom
}
else
{
- grpc_closure_list_add (closure_list, &tcp->read_closure, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, &tcp->read_closure, 1);
}
}
@@ -457,7 +457,7 @@ tcp_write (grpc_exec_ctx * exec_ctx, grpc_endpoint * ep, gpr_slice_buffer * buf,
if (buf->length == 0)
{
GRPC_TIMER_END (GRPC_PTAG_TCP_WRITE, 0);
- grpc_closure_list_add (closure_list, cb, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, cb, 1);
return;
}
tcp->outgoing_buffer = buf;
@@ -473,7 +473,7 @@ tcp_write (grpc_exec_ctx * exec_ctx, grpc_endpoint * ep, gpr_slice_buffer * buf,
}
else
{
- grpc_closure_list_add (closure_list, cb, status == FLUSH_DONE);
+ grpc_exec_ctx_enqueue (exec_ctx, cb, status == FLUSH_DONE);
}
GRPC_TIMER_END (GRPC_PTAG_TCP_WRITE, 0);
diff --git a/src/core/iomgr/tcp_server_posix.c b/src/core/iomgr/tcp_server_posix.c
index 2d42e03ce0..5e83b8b3fd 100644
--- a/src/core/iomgr/tcp_server_posix.c
+++ b/src/core/iomgr/tcp_server_posix.c
@@ -151,7 +151,7 @@ grpc_tcp_server_create (void)
static void
finish_shutdown (grpc_exec_ctx * exec_ctx, grpc_tcp_server * s)
{
- grpc_closure_list_add (closure_list, s->shutdown_complete, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, s->shutdown_complete, 1);
gpr_mu_destroy (&s->mu);
diff --git a/src/core/iomgr/udp_server.c b/src/core/iomgr/udp_server.c
index 80b8748ea5..a1b6f75ede 100644
--- a/src/core/iomgr/udp_server.c
+++ b/src/core/iomgr/udp_server.c
@@ -144,7 +144,7 @@ grpc_udp_server_create (void)
static void
finish_shutdown (grpc_exec_ctx * exec_ctx, grpc_udp_server * s)
{
- grpc_closure_list_add (closure_list, s->shutdown_complete, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, s->shutdown_complete, 1);
gpr_mu_destroy (&s->mu);
gpr_cv_destroy (&s->cv);
diff --git a/src/core/security/secure_endpoint.c b/src/core/security/secure_endpoint.c
index 7dee1c1edb..97d1d2a141 100644
--- a/src/core/security/secure_endpoint.c
+++ b/src/core/security/secure_endpoint.c
@@ -148,7 +148,7 @@ call_read_cb (grpc_exec_ctx * exec_ctx, secure_endpoint * ep, int success)
}
}
ep->read_buffer = NULL;
- grpc_closure_list_add (closure_list, ep->read_cb, success);
+ grpc_exec_ctx_enqueue (exec_ctx, ep->read_cb, success);
SECURE_ENDPOINT_UNREF (exec_ctx, ep, "read");
}
@@ -340,7 +340,7 @@ endpoint_write (grpc_exec_ctx * exec_ctx, grpc_endpoint * secure_ep, gpr_slice_b
{
/* TODO(yangg) do different things according to the error type? */
gpr_slice_buffer_reset_and_unref (&ep->output_buffer);
- grpc_closure_list_add (closure_list, cb, 0);
+ grpc_exec_ctx_enqueue (exec_ctx, cb, 0);
return;
}
diff --git a/src/core/surface/server.c b/src/core/surface/server.c
index fac93beaa4..0b05720fa7 100644
--- a/src/core/surface/server.c
+++ b/src/core/surface/server.c
@@ -353,7 +353,7 @@ request_matcher_zombify_all_pending_calls (grpc_exec_ctx * exec_ctx, request_mat
calld->state = ZOMBIED;
gpr_mu_unlock (&calld->mu_state);
grpc_closure_init (&calld->kill_zombie_closure, kill_zombie, grpc_call_stack_element (grpc_call_get_call_stack (calld->call), 0));
- grpc_closure_list_add (closure_list, &calld->kill_zombie_closure, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, &calld->kill_zombie_closure, 1);
}
}
@@ -451,7 +451,7 @@ destroy_channel (grpc_exec_ctx * exec_ctx, channel_data * chand)
maybe_finish_shutdown (exec_ctx, chand->server);
chand->finish_destroy_channel_closure.cb = finish_destroy_channel;
chand->finish_destroy_channel_closure.cb_arg = chand;
- grpc_closure_list_add (closure_list, &chand->finish_destroy_channel_closure, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, &chand->finish_destroy_channel_closure, 1);
}
static void
@@ -466,7 +466,7 @@ finish_start_new_rpc (grpc_exec_ctx * exec_ctx, grpc_server * server, grpc_call_
calld->state = ZOMBIED;
gpr_mu_unlock (&calld->mu_state);
grpc_closure_init (&calld->kill_zombie_closure, kill_zombie, elem);
- grpc_closure_list_add (closure_list, &calld->kill_zombie_closure, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, &calld->kill_zombie_closure, 1);
return;
}
@@ -678,7 +678,7 @@ server_on_recv (grpc_exec_ctx * exec_ctx, void *ptr, int success)
calld->state = ZOMBIED;
gpr_mu_unlock (&calld->mu_state);
grpc_closure_init (&calld->kill_zombie_closure, kill_zombie, elem);
- grpc_closure_list_add (closure_list, &calld->kill_zombie_closure, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, &calld->kill_zombie_closure, 1);
}
else
{
@@ -692,7 +692,7 @@ server_on_recv (grpc_exec_ctx * exec_ctx, void *ptr, int success)
calld->state = ZOMBIED;
gpr_mu_unlock (&calld->mu_state);
grpc_closure_init (&calld->kill_zombie_closure, kill_zombie, elem);
- grpc_closure_list_add (closure_list, &calld->kill_zombie_closure, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, &calld->kill_zombie_closure, 1);
}
else if (calld->state == PENDING)
{
@@ -1258,7 +1258,7 @@ queue_call_request (grpc_exec_ctx * exec_ctx, grpc_server * server, requested_ca
{
gpr_mu_unlock (&calld->mu_state);
grpc_closure_init (&calld->kill_zombie_closure, kill_zombie, grpc_call_stack_element (grpc_call_get_call_stack (calld->call), 0));
- grpc_closure_list_add (closure_list, &calld->kill_zombie_closure, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, &calld->kill_zombie_closure, 1);
}
else
{
diff --git a/src/core/transport/chttp2/frame_ping.c b/src/core/transport/chttp2/frame_ping.c
index 2038a4eb27..eaa086bd2b 100644
--- a/src/core/transport/chttp2/frame_ping.c
+++ b/src/core/transport/chttp2/frame_ping.c
@@ -97,7 +97,7 @@ grpc_chttp2_ping_parser_parse (grpc_exec_ctx * exec_ctx, void *parser, grpc_chtt
{
if (0 == memcmp (p->opaque_8bytes, ping->id, 8))
{
- grpc_closure_list_add (closure_list, ping->on_recv, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, ping->on_recv, 1);
}
ping->next->prev = ping->prev;
ping->prev->next = ping->next;
diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c
index 6c051f5b47..ebc170fb43 100644
--- a/src/core/transport/chttp2/writing.c
+++ b/src/core/transport/chttp2/writing.c
@@ -202,7 +202,7 @@ grpc_chttp2_cleanup_writing (grpc_exec_ctx * exec_ctx, grpc_chttp2_transport_glo
{
GPR_ASSERT (stream_global->write_state != GRPC_WRITE_STATE_QUEUED_CLOSE);
stream_global->outgoing_sopb = NULL;
- grpc_closure_list_add (closure_list, stream_global->send_done_closure, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, stream_global->send_done_closure, 1);
}
}
stream_global->writing_now = 0;
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c
index d880a1b9db..573cc34d88 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -157,7 +157,7 @@ destruct_transport (grpc_exec_ctx * exec_ctx, grpc_chttp2_transport * t)
while (t->global.pings.next != &t->global.pings)
{
grpc_chttp2_outstanding_ping *ping = t->global.pings.next;
- grpc_closure_list_add (closure_list, ping->on_recv, 0);
+ grpc_exec_ctx_enqueue (exec_ctx, ping->on_recv, 0);
ping->next->prev = ping->prev;
ping->prev->next = ping->next;
gpr_free (ping);
@@ -523,7 +523,7 @@ unlock (grpc_exec_ctx * exec_ctx, grpc_chttp2_transport * t)
{
t->writing_active = 1;
REF_TRANSPORT (t, "writing");
- grpc_closure_list_add (closure_list, &t->writing_action, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, &t->writing_action, 1);
prevent_endpoint_shutdown (t);
}
@@ -673,7 +673,7 @@ perform_stream_op_locked (grpc_exec_ctx * exec_ctx, grpc_chttp2_transport_global
else
{
grpc_sopb_reset (op->send_ops);
- grpc_closure_list_add (closure_list, stream_global->send_done_closure, 0);
+ grpc_exec_ctx_enqueue (exec_ctx, stream_global->send_done_closure, 0);
}
}
@@ -707,7 +707,7 @@ perform_stream_op_locked (grpc_exec_ctx * exec_ctx, grpc_chttp2_transport_global
add_to_pollset_locked (TRANSPORT_FROM_GLOBAL (exec_ctx, transport_global), op->bind_pollset);
}
- grpc_closure_list_add (closure_list, op->on_consumed, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, op->on_consumed, 1);
}
static void
@@ -748,7 +748,7 @@ perform_transport_op (grpc_exec_ctx * exec_ctx, grpc_transport * gt, grpc_transp
lock (t);
- grpc_closure_list_add (closure_list, op->on_consumed, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, op->on_consumed, 1);
if (op->on_connectivity_state_change)
{
@@ -890,7 +890,7 @@ unlock_check_read_write_state (grpc_exec_ctx * exec_ctx, grpc_chttp2_transport *
{
grpc_sopb_reset (stream_global->outgoing_sopb);
stream_global->outgoing_sopb = NULL;
- grpc_closure_list_add (closure_list, stream_global->send_done_closure, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, stream_global->send_done_closure, 1);
}
stream_global->read_closed = 1;
if (!stream_global->published_cancelled)
@@ -936,7 +936,7 @@ unlock_check_read_write_state (grpc_exec_ctx * exec_ctx, grpc_chttp2_transport *
grpc_chttp2_incoming_metadata_buffer_postprocess_sopb_and_begin_live_op (&stream_global->incoming_metadata, &stream_global->incoming_sopb, &stream_global->outstanding_metadata);
grpc_sopb_swap (stream_global->publish_sopb, &stream_global->incoming_sopb);
stream_global->published_state = *stream_global->publish_state = state;
- grpc_closure_list_add (closure_list, stream_global->recv_done_closure, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, stream_global->recv_done_closure, 1);
stream_global->recv_done_closure = NULL;
stream_global->publish_sopb = NULL;
stream_global->publish_state = NULL;
diff --git a/src/core/transport/connectivity_state.c b/src/core/transport/connectivity_state.c
index 76a69d1dab..fc39515f91 100644
--- a/src/core/transport/connectivity_state.c
+++ b/src/core/transport/connectivity_state.c
@@ -87,7 +87,7 @@ grpc_connectivity_state_destroy (grpc_exec_ctx * exec_ctx, grpc_connectivity_sta
{
success = 0;
}
- grpc_closure_list_add (closure_list, w->notify, success);
+ grpc_exec_ctx_enqueue (exec_ctx, w->notify, success);
gpr_free (w);
}
gpr_free (tracker->name);
@@ -113,7 +113,7 @@ grpc_connectivity_state_notify_on_state_change (grpc_exec_ctx * exec_ctx, grpc_c
if (tracker->current_state != *current)
{
*current = tracker->current_state;
- grpc_closure_list_add (closure_list, notify, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, notify, 1);
}
else
{
@@ -144,7 +144,7 @@ grpc_connectivity_state_set (grpc_exec_ctx * exec_ctx, grpc_connectivity_state_t
{
*w->current = tracker->current_state;
tracker->watchers = w->next;
- grpc_closure_list_add (closure_list, w->notify, 1);
+ grpc_exec_ctx_enqueue (exec_ctx, w->notify, 1);
gpr_free (w);
}
}
diff --git a/src/core/transport/transport.c b/src/core/transport/transport.c
index e41481aa64..35ba0ba067 100644
--- a/src/core/transport/transport.c
+++ b/src/core/transport/transport.c
@@ -81,9 +81,9 @@ grpc_transport_get_peer (grpc_exec_ctx * exec_ctx, grpc_transport * transport)
void
grpc_transport_stream_op_finish_with_failure (grpc_exec_ctx * exec_ctx, grpc_transport_stream_op * op)
{
- grpc_closure_list_add (closure_list, op->on_done_recv, 0);
- grpc_closure_list_add (closure_list, op->on_done_send, 0);
- grpc_closure_list_add (closure_list, op->on_consumed, 0);
+ grpc_exec_ctx_enqueue (exec_ctx, op->on_done_recv, 0);
+ grpc_exec_ctx_enqueue (exec_ctx, op->on_done_send, 0);
+ grpc_exec_ctx_enqueue (exec_ctx, op->on_consumed, 0);
}
void