clang-format

pull/20643/head
Vijay Pai 6 years ago
parent 6ca827a008
commit 82e185399d
  1. 4
      test/cpp/microbenchmarks/bm_chttp2_transport.cc
  2. 9
      test/cpp/microbenchmarks/bm_cq_multiple_threads.cc
  3. 12
      test/cpp/microbenchmarks/bm_threadpool.cc

@ -100,8 +100,8 @@ class DummyEndpoint : public grpc_endpoint {
GRPC_CLOSURE_SCHED(cb, GRPC_ERROR_NONE);
}
static void add_to_pollset(grpc_endpoint* /*ep*/,
grpc_pollset* /*pollset*/) {}
static void add_to_pollset(grpc_endpoint* /*ep*/, grpc_pollset* /*pollset*/) {
}
static void add_to_pollset_set(grpc_endpoint* /*ep*/,
grpc_pollset_set* /*pollset*/) {}

@ -61,8 +61,7 @@ static grpc_error* pollset_kick(grpc_pollset* /*p*/,
}
/* Callback when the tag is dequeued from the completion queue. Does nothing */
static void cq_done_cb(void* /*done_arg*/,
grpc_cq_completion* cq_completion) {
static void cq_done_cb(void* /*done_arg*/, grpc_cq_completion* cq_completion) {
gpr_free(cq_completion);
}
@ -98,10 +97,8 @@ static const grpc_event_engine_vtable* init_engine_vtable(bool) {
g_vtable.pollset_work = pollset_work;
g_vtable.pollset_kick = pollset_kick;
g_vtable.is_any_background_poller_thread = [] { return false; };
g_vtable.add_closure_to_background_poller = [](grpc_closure* /*closure*/,
grpc_error* /*error*/) {
return false;
};
g_vtable.add_closure_to_background_poller =
[](grpc_closure* /*closure*/, grpc_error* /*error*/) { return false; };
g_vtable.shutdown_background_closure = [] {};
g_vtable.shutdown_engine = [] {};

@ -72,8 +72,7 @@ class AddAnotherFunctor : public grpc_experimental_completion_queue_functor {
}
// When the functor gets to run in thread pool, it will take itself as first
// argument and internal_success as second one.
static void Run(grpc_experimental_completion_queue_functor* cb,
int /*ok*/) {
static void Run(grpc_experimental_completion_queue_functor* cb, int /*ok*/) {
auto* callback = static_cast<AddAnotherFunctor*>(cb);
if (--callback->num_add_ > 0) {
callback->pool_->Add(new AddAnotherFunctor(
@ -135,8 +134,7 @@ class SuicideFunctorForAdd : public grpc_experimental_completion_queue_functor {
internal_success = 0;
}
static void Run(grpc_experimental_completion_queue_functor* cb,
int /*ok*/) {
static void Run(grpc_experimental_completion_queue_functor* cb, int /*ok*/) {
// On running, the first argument would be itself.
auto* callback = static_cast<SuicideFunctorForAdd*>(cb);
callback->counter_->DecrementCount();
@ -189,8 +187,7 @@ class AddSelfFunctor : public grpc_experimental_completion_queue_functor {
}
// When the functor gets to run in thread pool, it will take itself as first
// argument and internal_success as second one.
static void Run(grpc_experimental_completion_queue_functor* cb,
int /*ok*/) {
static void Run(grpc_experimental_completion_queue_functor* cb, int /*ok*/) {
auto* callback = static_cast<AddSelfFunctor*>(cb);
if (--callback->num_add_ > 0) {
callback->pool_->Add(cb);
@ -268,8 +265,7 @@ class ShortWorkFunctorForAdd
internal_success = 0;
val_ = 0;
}
static void Run(grpc_experimental_completion_queue_functor* cb,
int /*ok*/) {
static void Run(grpc_experimental_completion_queue_functor* cb, int /*ok*/) {
auto* callback = static_cast<ShortWorkFunctorForAdd*>(cb);
// Uses pad to avoid compiler complaining unused variable error.
callback->pad[0] = 0;

Loading…
Cancel
Save