change gpr_atm to int

pull/11000/head
Yuxuan Li 8 years ago
parent 87827e03aa
commit 85d3a53905
  1. 2
      src/core/lib/surface/completion_queue.c
  2. 2
      src/core/lib/surface/completion_queue.h
  3. 2
      test/cpp/qps/client_async.cc
  4. 2
      test/cpp/qps/server_async.cc

@ -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;

@ -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);

@ -208,7 +208,7 @@ class AsyncClient : public ClientImpl<StubType, RequestType> {
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;
}

@ -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;
}

Loading…
Cancel
Save