aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/microbenchmarks/bm_pollset.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/microbenchmarks/bm_pollset.cc')
-rw-r--r--test/cpp/microbenchmarks/bm_pollset.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/cpp/microbenchmarks/bm_pollset.cc b/test/cpp/microbenchmarks/bm_pollset.cc
index 543b24b77a..683f4703c2 100644
--- a/test/cpp/microbenchmarks/bm_pollset.cc
+++ b/test/cpp/microbenchmarks/bm_pollset.cc
@@ -54,7 +54,7 @@ static void BM_CreateDestroyPollset(benchmark::State& state) {
gpr_mu* mu;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_closure shutdown_ps_closure;
- grpc_closure_init(&shutdown_ps_closure, shutdown_ps, ps,
+ GRPC_CLOSURE_INIT(&shutdown_ps_closure, shutdown_ps, ps,
grpc_schedule_on_exec_ctx);
while (state.KeepRunning()) {
memset(ps, 0, ps_sz);
@@ -124,7 +124,7 @@ static void BM_PollEmptyPollset(benchmark::State& state) {
GRPC_ERROR_UNREF(grpc_pollset_work(&exec_ctx, ps, NULL, now, deadline));
}
grpc_closure shutdown_ps_closure;
- grpc_closure_init(&shutdown_ps_closure, shutdown_ps, ps,
+ GRPC_CLOSURE_INIT(&shutdown_ps_closure, shutdown_ps, ps,
grpc_schedule_on_exec_ctx);
grpc_pollset_shutdown(&exec_ctx, ps, &shutdown_ps_closure);
gpr_mu_unlock(mu);
@@ -151,7 +151,7 @@ static void BM_PollAddFd(benchmark::State& state) {
}
grpc_fd_orphan(&exec_ctx, fd, NULL, NULL, "xxx");
grpc_closure shutdown_ps_closure;
- grpc_closure_init(&shutdown_ps_closure, shutdown_ps, ps,
+ GRPC_CLOSURE_INIT(&shutdown_ps_closure, shutdown_ps, ps,
grpc_schedule_on_exec_ctx);
gpr_mu_lock(mu);
grpc_pollset_shutdown(&exec_ctx, ps, &shutdown_ps_closure);
@@ -171,7 +171,7 @@ template <class F>
Closure* MakeClosure(F f, grpc_closure_scheduler* scheduler) {
struct C : public Closure {
C(F f, grpc_closure_scheduler* scheduler) : f_(f) {
- grpc_closure_init(this, C::cbfn, this, scheduler);
+ GRPC_CLOSURE_INIT(this, C::cbfn, this, scheduler);
}
static void cbfn(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) {
C* p = static_cast<C*>(arg);
@@ -250,7 +250,7 @@ static void BM_SingleThreadPollOneFd(benchmark::State& state) {
grpc_fd_orphan(&exec_ctx, wakeup, NULL, NULL, "done");
wakeup_fd.read_fd = 0;
grpc_closure shutdown_ps_closure;
- grpc_closure_init(&shutdown_ps_closure, shutdown_ps, ps,
+ GRPC_CLOSURE_INIT(&shutdown_ps_closure, shutdown_ps, ps,
grpc_schedule_on_exec_ctx);
grpc_pollset_shutdown(&exec_ctx, ps, &shutdown_ps_closure);
gpr_mu_unlock(mu);