From 85d3a539053d6960473bc78a2818d94b7953c197 Mon Sep 17 00:00:00 2001 From: Yuxuan Li Date: Mon, 8 May 2017 06:18:52 +0000 Subject: [PATCH] change gpr_atm to int --- src/core/lib/surface/completion_queue.c | 2 +- src/core/lib/surface/completion_queue.h | 2 +- test/cpp/qps/client_async.cc | 2 +- test/cpp/qps/server_async.cc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index e48d2f8f468..be1a4a1df51 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -310,7 +310,7 @@ grpc_cq_completion_type grpc_get_cq_completion_type(grpc_completion_queue *cc) { return cc->completion_type; } -gpr_atm grpc_get_cq_poll_num(grpc_completion_queue *cc) { +int grpc_get_cq_poll_num(grpc_completion_queue *cc) { int cur_num_polls; gpr_mu_lock(cc->mu); cur_num_polls = cc->num_polls; diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index d8c812f2aee..add52e8a076 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -100,7 +100,7 @@ bool grpc_cq_can_listen(grpc_completion_queue *cc); grpc_cq_completion_type grpc_get_cq_completion_type(grpc_completion_queue *cc); -gpr_atm grpc_get_cq_poll_num(grpc_completion_queue *cc); +int grpc_get_cq_poll_num(grpc_completion_queue *cc); grpc_completion_queue *grpc_completion_queue_create_internal( grpc_cq_completion_type completion_type, grpc_cq_polling_type polling_type); diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index d9cda9fb071..d0beab354ce 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -208,7 +208,7 @@ class AsyncClient : public ClientImpl { int GetPollCount() override { int count = 0; for (auto cq = cli_cqs_.begin(); cq != cli_cqs_.end(); cq++) { - count += (int)grpc_get_cq_poll_num((*cq)->cq()); + count += grpc_get_cq_poll_num((*cq)->cq()); } return count; } diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index 4f0b1f54d7f..812c80f1b75 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -157,7 +157,7 @@ class AsyncQpsServerTest final : public grpc::testing::Server { int GetPollCount() override { int count = 0; for (auto cq = srv_cqs_.begin(); cq != srv_cqs_.end(); cq++) { - count += (int)grpc_get_cq_poll_num((*cq)->cq()); + count += grpc_get_cq_poll_num((*cq)->cq()); } return count; }