aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/iomgr
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-09-22 10:48:23 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-09-22 10:48:23 -0700
commit8ad03754ec6775fa4055644d43f06b748cc03d98 (patch)
tree25fb47ffea567cad2ae466a8a8d45bcec87b5b1d /src/core/iomgr
parent9f7dc3a4e5c3eeb6524472c6dc694f0600d03688 (diff)
Change runs to enqueue
Diffstat (limited to 'src/core/iomgr')
-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
8 files changed, 19 insertions, 19 deletions
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);