aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2016-06-06 16:39:47 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2016-06-06 16:39:47 -0700
commit69ff63d158dc7c4aa00b52b71cf816f5c2a7ee30 (patch)
treee5c3f7b48f2a9589de4a7ecd9a1023658dc92301 /src
parent1cf4ec7ad0e9693297eb3852f28ad5864cea3c7c (diff)
clang-format
Diffstat (limited to 'src')
-rw-r--r--src/core/ext/lb_policy/pick_first/pick_first.c11
-rw-r--r--src/core/ext/lb_policy/round_robin/round_robin.c9
-rw-r--r--src/core/lib/http/httpcli.c4
-rw-r--r--src/core/lib/iomgr/polling_entity.c14
-rw-r--r--src/core/lib/iomgr/polling_entity.h11
-rw-r--r--src/core/lib/security/credentials/google_default/google_default_credentials.c7
-rw-r--r--src/core/lib/surface/call.c6
7 files changed, 35 insertions, 27 deletions
diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c
index ce81cf9f67..cc559eb2da 100644
--- a/src/core/ext/lb_policy/pick_first/pick_first.c
+++ b/src/core/ext/lb_policy/pick_first/pick_first.c
@@ -119,7 +119,7 @@ static void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
pending_pick *next = pp->next;
*pp->target = NULL;
grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent,
- p->base.interested_parties);
+ p->base.interested_parties);
grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL);
gpr_free(pp);
pp = next;
@@ -137,7 +137,7 @@ static void pf_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
pending_pick *next = pp->next;
if (pp->target == target) {
grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent,
- p->base.interested_parties);
+ p->base.interested_parties);
*target = NULL;
grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL);
gpr_free(pp);
@@ -163,7 +163,7 @@ static void pf_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
if ((pp->initial_metadata_flags & initial_metadata_flags_mask) ==
initial_metadata_flags_eq) {
grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent,
- p->base.interested_parties);
+ p->base.interested_parties);
grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL);
gpr_free(pp);
} else {
@@ -222,7 +222,8 @@ static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
if (!p->started_picking) {
start_picking(exec_ctx, p);
}
- grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent, p->base.interested_parties);
+ grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent,
+ p->base.interested_parties);
pp = gpr_malloc(sizeof(*pp));
pp->next = p->pending_picks;
pp->pollent = pollent;
@@ -306,7 +307,7 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
p->pending_picks = pp->next;
*pp->target = selected;
grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent,
- p->base.interested_parties);
+ p->base.interested_parties);
grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL);
gpr_free(pp);
}
diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c
index 5ce6c4ff5b..8645333c8e 100644
--- a/src/core/ext/lb_policy/round_robin/round_robin.c
+++ b/src/core/ext/lb_policy/round_robin/round_robin.c
@@ -263,7 +263,7 @@ static void rr_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
pending_pick *next = pp->next;
if (pp->target == target) {
grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent,
- p->base.interested_parties);
+ p->base.interested_parties);
*target = NULL;
grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL);
gpr_free(pp);
@@ -289,7 +289,7 @@ static void rr_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
if ((pp->initial_metadata_flags & initial_metadata_flags_mask) ==
initial_metadata_flags_eq) {
grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent,
- p->base.interested_parties);
+ p->base.interested_parties);
*pp->target = NULL;
grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL);
gpr_free(pp);
@@ -355,7 +355,8 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
if (!p->started_picking) {
start_picking(exec_ctx, p);
}
- grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent, p->base.interested_parties);
+ grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent,
+ p->base.interested_parties);
pp = gpr_malloc(sizeof(*pp));
pp->next = p->pending_picks;
pp->pollent = pollent;
@@ -408,7 +409,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
selected->subchannel, selected);
}
grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent,
- p->base.interested_parties);
+ p->base.interested_parties);
grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL);
gpr_free(pp);
}
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(