From 69ff63d158dc7c4aa00b52b71cf816f5c2a7ee30 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 6 Jun 2016 16:39:47 -0700 Subject: clang-format --- src/core/lib/http/httpcli.c | 4 ++-- src/core/lib/iomgr/polling_entity.c | 14 ++++++++------ src/core/lib/iomgr/polling_entity.h | 11 ++++++----- .../google_default/google_default_credentials.c | 7 ++++--- src/core/lib/surface/call.c | 6 ++++-- 5 files changed, 24 insertions(+), 18 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index d49f020038..e8957bfe89 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -98,7 +98,7 @@ static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req); static void finish(grpc_exec_ctx *exec_ctx, internal_request *req, int success) { grpc_polling_entity_del_from_pollset_set(exec_ctx, req->pollent, - req->context->pollset_set); + req->context->pollset_set); req->on_response(exec_ctx, req->user_data, success ? &req->parser.http.response : NULL); grpc_http_parser_destroy(&req->parser); @@ -246,7 +246,7 @@ static void internal_request_begin( GPR_ASSERT(pollent); grpc_polling_entity_add_to_pollset_set(exec_ctx, req->pollent, - req->context->pollset_set); + req->context->pollset_set); grpc_resolve_address(exec_ctx, request->host, req->handshaker->default_port, on_resolved, req); } diff --git a/src/core/lib/iomgr/polling_entity.c b/src/core/lib/iomgr/polling_entity.c index 45d7dccafa..d1686aa12f 100644 --- a/src/core/lib/iomgr/polling_entity.c +++ b/src/core/lib/iomgr/polling_entity.c @@ -44,7 +44,8 @@ grpc_polling_entity grpc_polling_entity_create_from_pollset_set( return pollent; } -grpc_polling_entity grpc_polling_entity_create_from_pollset(grpc_pollset *pollset) { +grpc_polling_entity grpc_polling_entity_create_from_pollset( + grpc_pollset *pollset) { grpc_polling_entity pollent; pollent.pollent.pollset = pollset; pollent.tag = POPS_POLLSET; @@ -58,7 +59,8 @@ grpc_pollset *grpc_polling_entity_pollset(grpc_polling_entity *pollent) { return NULL; } -grpc_pollset_set *grpc_polling_entity_pollset_set(grpc_polling_entity *pollent) { +grpc_pollset_set *grpc_polling_entity_pollset_set( + grpc_polling_entity *pollent) { if (pollent->tag == POPS_POLLSET_SET) { return pollent->pollent.pollset_set; } @@ -70,8 +72,8 @@ bool grpc_polling_entity_is_empty(const grpc_polling_entity *pollent) { } void grpc_polling_entity_add_to_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_polling_entity *pollent, - grpc_pollset_set *pss_dst) { + grpc_polling_entity *pollent, + grpc_pollset_set *pss_dst) { if (pollent->tag == POPS_POLLSET) { GPR_ASSERT(pollent->pollent.pollset != NULL); grpc_pollset_set_add_pollset(exec_ctx, pss_dst, pollent->pollent.pollset); @@ -86,8 +88,8 @@ void grpc_polling_entity_add_to_pollset_set(grpc_exec_ctx *exec_ctx, } void grpc_polling_entity_del_from_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_polling_entity *pollent, - grpc_pollset_set *pss_dst) { + grpc_polling_entity *pollent, + grpc_pollset_set *pss_dst) { if (pollent->tag == POPS_POLLSET) { GPR_ASSERT(pollent->pollent.pollset != NULL); grpc_pollset_set_del_pollset(exec_ctx, pss_dst, pollent->pollent.pollset); diff --git a/src/core/lib/iomgr/polling_entity.h b/src/core/lib/iomgr/polling_entity.h index 1750e28eb1..e81531053c 100644 --- a/src/core/lib/iomgr/polling_entity.h +++ b/src/core/lib/iomgr/polling_entity.h @@ -52,7 +52,8 @@ typedef struct grpc_polling_entity { grpc_polling_entity grpc_polling_entity_create_from_pollset_set( grpc_pollset_set *pollset_set); -grpc_polling_entity grpc_polling_entity_create_from_pollset(grpc_pollset *pollset); +grpc_polling_entity grpc_polling_entity_create_from_pollset( + grpc_pollset *pollset); /** If \a pollent contains a pollset, return it. Otherwise, return NULL */ grpc_pollset *grpc_polling_entity_pollset(grpc_polling_entity *pollent); @@ -66,15 +67,15 @@ bool grpc_polling_entity_is_empty(const grpc_polling_entity *pollent); * \a * pss_dst */ void grpc_polling_entity_add_to_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_polling_entity *pollent, - grpc_pollset_set *pss_dst); + grpc_polling_entity *pollent, + grpc_pollset_set *pss_dst); /** Delete the pollset or pollset_set in \a pollent from the destination * pollset_set \a * pss_dst */ void grpc_polling_entity_del_from_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_polling_entity *pollent, - grpc_pollset_set *pss_dst); + grpc_polling_entity *pollent, + grpc_pollset_set *pss_dst); /* pollset_set specific */ #endif /* GRPC_CORE_LIB_IOMGR_POLLING_ENTITY_H */ diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c index 84d5bd3395..98df68e7b3 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -130,8 +130,8 @@ static int is_stack_running_on_compute_engine(void) { gpr_mu_lock(g_polling_mu); while (!detector.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&detector.pollent), &worker, - gpr_now(GPR_CLOCK_MONOTONIC), + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&detector.pollent), + &worker, gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC)); } gpr_mu_unlock(g_polling_mu); @@ -139,7 +139,8 @@ static int is_stack_running_on_compute_engine(void) { grpc_httpcli_context_destroy(&context); grpc_closure_init(&destroy_closure, destroy_pollset, grpc_polling_entity_pollset(&detector.pollent)); - grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&detector.pollent), + grpc_pollset_shutdown(&exec_ctx, + grpc_polling_entity_pollset(&detector.pollent), &destroy_closure); grpc_exec_ctx_finish(&exec_ctx); g_polling_mu = NULL; diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 08b8dd2768..e899bc8098 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -264,10 +264,12 @@ grpc_call *grpc_call_create( pollset_set_alternative == NULL && "Only one of 'cq' and 'pollset_set_alternative' should be non-NULL."); GRPC_CQ_INTERNAL_REF(cq, "bind"); - call->pollent = grpc_polling_entity_create_from_pollset(grpc_cq_pollset(cq)); + call->pollent = + grpc_polling_entity_create_from_pollset(grpc_cq_pollset(cq)); } if (pollset_set_alternative != NULL) { - call->pollent = grpc_polling_entity_create_from_pollset_set(pollset_set_alternative); + call->pollent = + grpc_polling_entity_create_from_pollset_set(pollset_set_alternative); } if (!grpc_polling_entity_is_empty(&call->pollent)) { grpc_call_stack_set_pollset_or_pollset_set( -- cgit v1.2.3