diff options
author | David Garcia Quintas <dgq@google.com> | 2016-06-06 14:56:02 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2016-06-06 14:56:02 -0700 |
commit | c4d5112719f90b6948d0b8295164bb058bfeea3d (patch) | |
tree | d6984e7b7bf66f1adecccabeeda9a7fc086468c9 | |
parent | 2a50dfefdc8a244113864049573416aa04ec9a56 (diff) |
moar renamings
-rw-r--r-- | src/core/ext/lb_policy/pick_first/pick_first.c | 10 | ||||
-rw-r--r-- | src/core/ext/lb_policy/round_robin/round_robin.c | 8 | ||||
-rw-r--r-- | src/core/lib/http/httpcli.c | 4 | ||||
-rw-r--r-- | src/core/lib/iomgr/polling_entity.c | 14 | ||||
-rw-r--r-- | src/core/lib/iomgr/polling_entity.h | 14 | ||||
-rw-r--r-- | src/core/lib/security/credentials/google_default/google_default_credentials.c | 12 | ||||
-rw-r--r-- | src/core/lib/security/credentials/jwt/jwt_verifier.c | 2 | ||||
-rw-r--r-- | src/core/lib/surface/call.c | 10 | ||||
-rw-r--r-- | src/core/lib/transport/transport.c | 4 | ||||
-rw-r--r-- | test/core/http/httpcli_test.c | 14 | ||||
-rw-r--r-- | test/core/http/httpscli_test.c | 14 | ||||
-rw-r--r-- | test/core/security/oauth2_utils.c | 10 | ||||
-rw-r--r-- | test/core/security/print_google_default_creds_token.c | 8 | ||||
-rw-r--r-- | test/core/util/port_server_client.c | 18 |
14 files changed, 71 insertions, 71 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 d428d41a62..103f091709 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -118,7 +118,7 @@ static void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { while (pp != NULL) { pending_pick *next = pp->next; *pp->target = NULL; - grpc_pops_del_to_pollset_set(exec_ctx, pp->pollent, + grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, p->base.interested_parties); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); gpr_free(pp); @@ -136,7 +136,7 @@ static void pf_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, while (pp != NULL) { pending_pick *next = pp->next; if (pp->target == target) { - grpc_pops_del_to_pollset_set(exec_ctx, pp->pollent, + grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, p->base.interested_parties); *target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); @@ -162,7 +162,7 @@ static void pf_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, pending_pick *next = pp->next; if ((pp->initial_metadata_flags & initial_metadata_flags_mask) == initial_metadata_flags_eq) { - grpc_pops_del_to_pollset_set(exec_ctx, pp->pollent, + grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, p->base.interested_parties); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); @@ -222,7 +222,7 @@ static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if (!p->started_picking) { start_picking(exec_ctx, p); } - grpc_pops_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; @@ -305,7 +305,7 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, while ((pp = p->pending_picks)) { p->pending_picks = pp->next; *pp->target = selected; - grpc_pops_del_to_pollset_set(exec_ctx, pp->pollent, + grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, 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 e706a8ddd9..f58b2e41df 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -262,7 +262,7 @@ static void rr_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, while (pp != NULL) { pending_pick *next = pp->next; if (pp->target == target) { - grpc_pops_del_to_pollset_set(exec_ctx, pp->pollent, + grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, p->base.interested_parties); *target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); @@ -288,7 +288,7 @@ static void rr_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, pending_pick *next = pp->next; if ((pp->initial_metadata_flags & initial_metadata_flags_mask) == initial_metadata_flags_eq) { - grpc_pops_del_to_pollset_set(exec_ctx, pp->pollent, + grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, p->base.interested_parties); *pp->target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); @@ -355,7 +355,7 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if (!p->started_picking) { start_picking(exec_ctx, p); } - grpc_pops_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; @@ -407,7 +407,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, "[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (NODE %p)", selected->subchannel, selected); } - grpc_pops_del_to_pollset_set(exec_ctx, pp->pollent, + grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, 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 5e7c3267f2..d49f020038 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -97,7 +97,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_pops_del_to_pollset_set(exec_ctx, req->pollent, + grpc_polling_entity_del_from_pollset_set(exec_ctx, req->pollent, req->context->pollset_set); req->on_response(exec_ctx, req->user_data, success ? &req->parser.http.response : NULL); @@ -245,7 +245,7 @@ static void internal_request_begin( req->ssl_host_override = gpr_strdup(request->ssl_host_override); GPR_ASSERT(pollent); - grpc_pops_add_to_pollset_set(exec_ctx, req->pollent, + grpc_polling_entity_add_to_pollset_set(exec_ctx, req->pollent, 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 effe1a33ee..45d7dccafa 100644 --- a/src/core/lib/iomgr/polling_entity.c +++ b/src/core/lib/iomgr/polling_entity.c @@ -36,7 +36,7 @@ #include "src/core/lib/iomgr/polling_entity.h" -grpc_polling_entity grpc_pops_create_from_pollset_set( +grpc_polling_entity grpc_polling_entity_create_from_pollset_set( grpc_pollset_set *pollset_set) { grpc_polling_entity pollent; pollent.pollent.pollset_set = pollset_set; @@ -44,32 +44,32 @@ grpc_polling_entity grpc_pops_create_from_pollset_set( return pollent; } -grpc_polling_entity grpc_pops_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; return pollent; } -grpc_pollset *grpc_pops_pollset(grpc_polling_entity *pollent) { +grpc_pollset *grpc_polling_entity_pollset(grpc_polling_entity *pollent) { if (pollent->tag == POPS_POLLSET) { return pollent->pollent.pollset; } return NULL; } -grpc_pollset_set *grpc_pops_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; } return NULL; } -bool grpc_pops_is_empty(const grpc_polling_entity *pollent) { +bool grpc_polling_entity_is_empty(const grpc_polling_entity *pollent) { return pollent->tag == POPS_NONE; } -void grpc_pops_add_to_pollset_set(grpc_exec_ctx *exec_ctx, +void grpc_polling_entity_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_polling_entity *pollent, grpc_pollset_set *pss_dst) { if (pollent->tag == POPS_POLLSET) { @@ -85,7 +85,7 @@ void grpc_pops_add_to_pollset_set(grpc_exec_ctx *exec_ctx, } } -void grpc_pops_del_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) { if (pollent->tag == POPS_POLLSET) { diff --git a/src/core/lib/iomgr/polling_entity.h b/src/core/lib/iomgr/polling_entity.h index c72b292ffe..1750e28eb1 100644 --- a/src/core/lib/iomgr/polling_entity.h +++ b/src/core/lib/iomgr/polling_entity.h @@ -50,29 +50,29 @@ typedef struct grpc_polling_entity { enum pops_tag { POPS_NONE, POPS_POLLSET, POPS_POLLSET_SET } tag; } grpc_polling_entity; -grpc_polling_entity grpc_pops_create_from_pollset_set( +grpc_polling_entity grpc_polling_entity_create_from_pollset_set( grpc_pollset_set *pollset_set); -grpc_polling_entity grpc_pops_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_pops_pollset(grpc_polling_entity *pollent); +grpc_pollset *grpc_polling_entity_pollset(grpc_polling_entity *pollent); /** If \a pollent contains a pollset_set, return it. Otherwise, return NULL */ -grpc_pollset_set *grpc_pops_pollset_set(grpc_polling_entity *pollent); +grpc_pollset_set *grpc_polling_entity_pollset_set(grpc_polling_entity *pollent); -bool grpc_pops_is_empty(const grpc_polling_entity *pollent); +bool grpc_polling_entity_is_empty(const grpc_polling_entity *pollent); /** Add the pollset or pollset_set in \a pollent to the destination pollset_set * \a * pss_dst */ -void grpc_pops_add_to_pollset_set(grpc_exec_ctx *exec_ctx, +void grpc_polling_entity_add_to_pollset_set(grpc_exec_ctx *exec_ctx, 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_pops_del_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); /* pollset_set specific */ 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 ef21c24a6c..84d5bd3395 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 @@ -87,7 +87,7 @@ static void on_compute_engine_detection_http_response( } gpr_mu_lock(g_polling_mu); detector->is_done = 1; - grpc_pollset_kick(grpc_pops_pollset(&detector->pollent), NULL); + grpc_pollset_kick(grpc_polling_entity_pollset(&detector->pollent), NULL); gpr_mu_unlock(g_polling_mu); } @@ -108,7 +108,7 @@ static int is_stack_running_on_compute_engine(void) { grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pollset, &g_polling_mu); - detector.pollent = grpc_pops_create_from_pollset(pollset); + detector.pollent = grpc_polling_entity_create_from_pollset(pollset); detector.is_done = 0; detector.success = 0; @@ -130,7 +130,7 @@ 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_pops_pollset(&detector.pollent), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&detector.pollent), &worker, gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC)); } @@ -138,13 +138,13 @@ static int is_stack_running_on_compute_engine(void) { grpc_httpcli_context_destroy(&context); grpc_closure_init(&destroy_closure, destroy_pollset, - grpc_pops_pollset(&detector.pollent)); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&detector.pollent), + 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; - gpr_free(grpc_pops_pollset(&detector.pollent)); + gpr_free(grpc_polling_entity_pollset(&detector.pollent)); return detector.success; } diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.c b/src/core/lib/security/credentials/jwt/jwt_verifier.c index c56715e55a..1f67db103c 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.c +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.c @@ -342,7 +342,7 @@ static verifier_cb_ctx *verifier_cb_ctx_create( verifier_cb_ctx *ctx = gpr_malloc(sizeof(verifier_cb_ctx)); memset(ctx, 0, sizeof(verifier_cb_ctx)); ctx->verifier = verifier; - ctx->pollent = grpc_pops_create_from_pollset(pollset); + ctx->pollent = grpc_polling_entity_create_from_pollset(pollset); ctx->header = header; ctx->audience = gpr_strdup(audience); ctx->claims = claims; diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index decc37ef43..908f90244e 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -289,12 +289,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_pops_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_pops_create_from_pollset_set(pollset_set_alternative); + call->pollent = grpc_polling_entity_create_from_pollset_set(pollset_set_alternative); } - if (!grpc_pops_is_empty(&call->pollent)) { + if (!grpc_polling_entity_is_empty(&call->pollent)) { grpc_call_stack_set_pollset_or_pollset_set( &exec_ctx, CALL_STACK_FROM_CALL(call), &call->pollent); } @@ -352,13 +352,13 @@ void grpc_call_set_completion_queue(grpc_exec_ctx *exec_ctx, grpc_call *call, grpc_completion_queue *cq) { GPR_ASSERT(cq); - if (grpc_pops_pollset_set(&call->pollent) != NULL) { + if (grpc_polling_entity_pollset_set(&call->pollent) != NULL) { gpr_log(GPR_ERROR, "A pollset_set is already registered for this call."); abort(); } call->cq = cq; GRPC_CQ_INTERNAL_REF(cq, "bind"); - call->pollent = grpc_pops_create_from_pollset(grpc_cq_pollset(cq)); + call->pollent = grpc_polling_entity_create_from_pollset(grpc_cq_pollset(cq)); grpc_call_stack_set_pollset_or_pollset_set( exec_ctx, CALL_STACK_FROM_CALL(call), &call->pollent); } diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index 7449b16e20..b65e157a02 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -130,9 +130,9 @@ void grpc_transport_set_pops(grpc_exec_ctx *exec_ctx, grpc_transport *transport, grpc_polling_entity *pollent) { grpc_pollset *pollset; grpc_pollset_set *pollset_set; - if ((pollset = grpc_pops_pollset(pollent)) != NULL) { + if ((pollset = grpc_polling_entity_pollset(pollent)) != NULL) { transport->vtable->set_pollset(exec_ctx, transport, stream, pollset); - } else if ((pollset_set = grpc_pops_pollset_set(pollent)) != NULL) { + } else if ((pollset_set = grpc_polling_entity_pollset_set(pollent)) != NULL) { transport->vtable->set_pollset_set(exec_ctx, transport, stream, pollset_set); } else { diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c index 0e6eebb4e9..e61975e250 100644 --- a/test/core/http/httpcli_test.c +++ b/test/core/http/httpcli_test.c @@ -66,7 +66,7 @@ static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length)); gpr_mu_lock(g_mu); g_done = 1; - grpc_pollset_kick(grpc_pops_pollset(&g_pops), NULL); + grpc_pollset_kick(grpc_polling_entity_pollset(&g_pops), NULL); gpr_mu_unlock(g_mu); } @@ -91,7 +91,7 @@ static void test_get(int port) { gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&g_pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&g_pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); @@ -122,7 +122,7 @@ static void test_post(int port) { gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&g_pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&g_pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); @@ -133,7 +133,7 @@ static void test_post(int port) { } static void destroy_pops(grpc_exec_ctx *exec_ctx, void *p, bool success) { - grpc_pollset_destroy(grpc_pops_pollset(p)); + grpc_pollset_destroy(grpc_polling_entity_pollset(p)); } int main(int argc, char **argv) { @@ -182,18 +182,18 @@ int main(int argc, char **argv) { grpc_httpcli_context_init(&g_context); grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pollset, &g_mu); - g_pops = grpc_pops_create_from_pollset(pollset); + g_pops = grpc_polling_entity_create_from_pollset(pollset); test_get(port); test_post(port); grpc_httpcli_context_destroy(&g_context); grpc_closure_init(&destroyed, destroy_pops, &g_pops); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&g_pops), &destroyed); + grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&g_pops), &destroyed); grpc_exec_ctx_finish(&exec_ctx); grpc_shutdown(); - gpr_free(grpc_pops_pollset(&g_pops)); + gpr_free(grpc_polling_entity_pollset(&g_pops)); gpr_subprocess_destroy(server); diff --git a/test/core/http/httpscli_test.c b/test/core/http/httpscli_test.c index 3d00766fc2..90f0b8eeff 100644 --- a/test/core/http/httpscli_test.c +++ b/test/core/http/httpscli_test.c @@ -66,7 +66,7 @@ static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length)); gpr_mu_lock(g_mu); g_done = 1; - grpc_pollset_kick(grpc_pops_pollset(&g_pops), NULL); + grpc_pollset_kick(grpc_polling_entity_pollset(&g_pops), NULL); gpr_mu_unlock(g_mu); } @@ -92,7 +92,7 @@ static void test_get(int port) { gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&g_pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&g_pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); @@ -124,7 +124,7 @@ static void test_post(int port) { gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&g_pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&g_pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); @@ -135,7 +135,7 @@ static void test_post(int port) { } static void destroy_pops(grpc_exec_ctx *exec_ctx, void *p, bool success) { - grpc_pollset_destroy(grpc_pops_pollset(p)); + grpc_pollset_destroy(grpc_polling_entity_pollset(p)); } int main(int argc, char **argv) { @@ -185,18 +185,18 @@ int main(int argc, char **argv) { grpc_httpcli_context_init(&g_context); grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pollset, &g_mu); - g_pops = grpc_pops_create_from_pollset(pollset); + g_pops = grpc_polling_entity_create_from_pollset(pollset); test_get(port); test_post(port); grpc_httpcli_context_destroy(&g_context); grpc_closure_init(&destroyed, destroy_pops, &g_pops); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&g_pops), &destroyed); + grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&g_pops), &destroyed); grpc_exec_ctx_finish(&exec_ctx); grpc_shutdown(); - gpr_free(grpc_pops_pollset(&g_pops)); + gpr_free(grpc_polling_entity_pollset(&g_pops)); gpr_subprocess_destroy(server); diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 5c34feb03d..a341e33ef6 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -70,7 +70,7 @@ static void on_oauth2_response(grpc_exec_ctx *exec_ctx, void *user_data, gpr_mu_lock(request->mu); request->is_done = 1; request->token = token; - grpc_pollset_kick(grpc_pops_pollset(&request->pops), NULL); + grpc_pollset_kick(grpc_polling_entity_pollset(&request->pops), NULL); gpr_mu_unlock(request->mu); } @@ -85,7 +85,7 @@ char *grpc_test_fetch_oauth2_token_with_credentials( grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pollset, &request.mu); - request.pops = grpc_pops_create_from_pollset(pollset); + request.pops = grpc_polling_entity_create_from_pollset(pollset); request.is_done = 0; grpc_closure_init(&do_nothing_closure, do_nothing, NULL); @@ -98,15 +98,15 @@ char *grpc_test_fetch_oauth2_token_with_credentials( gpr_mu_lock(request.mu); while (!request.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&request.pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&request.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC)); } gpr_mu_unlock(request.mu); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&request.pops), + grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&request.pops), &do_nothing_closure); grpc_exec_ctx_finish(&exec_ctx); - gpr_free(grpc_pops_pollset(&request.pops)); + gpr_free(grpc_polling_entity_pollset(&request.pops)); return request.token; } diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index 6383883dec..48defbe25f 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -67,7 +67,7 @@ static void on_metadata_response(grpc_exec_ctx *exec_ctx, void *user_data, } gpr_mu_lock(sync->mu); sync->is_done = 1; - grpc_pollset_kick(grpc_pops_pollset(&sync->pops), NULL); + grpc_pollset_kick(grpc_polling_entity_pollset(&sync->pops), NULL); gpr_mu_unlock(sync->mu); } @@ -96,7 +96,7 @@ int main(int argc, char **argv) { grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pollset, &sync.mu); - sync.pops = grpc_pops_create_from_pollset(pollset); + sync.pops = grpc_polling_entity_create_from_pollset(pollset); sync.is_done = 0; grpc_call_credentials_get_request_metadata( @@ -106,7 +106,7 @@ int main(int argc, char **argv) { gpr_mu_lock(sync.mu); while (!sync.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&sync.pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&sync.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC)); gpr_mu_unlock(sync.mu); @@ -118,7 +118,7 @@ int main(int argc, char **argv) { grpc_exec_ctx_finish(&exec_ctx); grpc_channel_credentials_release(creds); - gpr_free(grpc_pops_pollset(&sync.pops)); + gpr_free(grpc_polling_entity_pollset(&sync.pops)); end: gpr_cmdline_destroy(cl); diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c index 8326042c2d..f924d553d5 100644 --- a/test/core/util/port_server_client.c +++ b/test/core/util/port_server_client.c @@ -57,7 +57,7 @@ typedef struct freereq { static void destroy_pops_and_shutdown(grpc_exec_ctx *exec_ctx, void *p, bool success) { - grpc_pollset *pollset = grpc_pops_pollset(p); + grpc_pollset *pollset = grpc_polling_entity_pollset(p); grpc_pollset_destroy(pollset); gpr_free(pollset); grpc_shutdown(); @@ -68,7 +68,7 @@ static void freed_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, freereq *pr = arg; gpr_mu_lock(pr->mu); pr->done = 1; - grpc_pollset_kick(grpc_pops_pollset(&pr->pops), NULL); + grpc_pollset_kick(grpc_polling_entity_pollset(&pr->pops), NULL); gpr_mu_unlock(pr->mu); } @@ -87,7 +87,7 @@ void grpc_free_port_using_server(char *server, int port) { grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pollset, &pr.mu); - pr.pops = grpc_pops_create_from_pollset(pollset); + pr.pops = grpc_polling_entity_create_from_pollset(pollset); shutdown_closure = grpc_closure_create(destroy_pops_and_shutdown, &pr.pops); req.host = server; @@ -101,7 +101,7 @@ void grpc_free_port_using_server(char *server, int port) { gpr_mu_lock(pr.mu); while (!pr.done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&pr.pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&pr.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); } @@ -109,7 +109,7 @@ void grpc_free_port_using_server(char *server, int port) { grpc_httpcli_context_destroy(&context); grpc_exec_ctx_finish(&exec_ctx); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&pr.pops), + grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&pr.pops), shutdown_closure); grpc_exec_ctx_finish(&exec_ctx); gpr_free(path); @@ -167,7 +167,7 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(port > 1024); gpr_mu_lock(pr->mu); pr->port = port; - grpc_pollset_kick(grpc_pops_pollset(&pr->pops), NULL); + grpc_pollset_kick(grpc_polling_entity_pollset(&pr->pops), NULL); gpr_mu_unlock(pr->mu); } @@ -184,7 +184,7 @@ int grpc_pick_port_using_server(char *server) { memset(&req, 0, sizeof(req)); grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pollset, &pr.mu); - pr.pops = grpc_pops_create_from_pollset(pollset); + pr.pops = grpc_polling_entity_create_from_pollset(pollset); shutdown_closure = grpc_closure_create(destroy_pops_and_shutdown, &pr.pops); pr.port = -1; pr.server = server; @@ -201,14 +201,14 @@ int grpc_pick_port_using_server(char *server) { gpr_mu_lock(pr.mu); while (pr.port == -1) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&pr.pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&pr.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); } gpr_mu_unlock(pr.mu); grpc_httpcli_context_destroy(&context); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&pr.pops), + grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&pr.pops), shutdown_closure); grpc_exec_ctx_finish(&exec_ctx); |