aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/fixtures
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-02-25 15:34:55 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-02-25 15:34:55 -0800
commit8be227840333e3766cbdbc477d7ebc8bfe6c3d10 (patch)
treecc2029c6ca1a053e44c72f0a3a263fb3e9bf74d9 /test/core/end2end/fixtures
parentee821bb10bca90c5a39d042349be1f8c8d01a289 (diff)
parente2a8a3f45ceb63bcb4c039aa2a53cb5deb7d4767 (diff)
Merge branch 'hide-the-pollset-set' into cleaner-posix2
Diffstat (limited to 'test/core/end2end/fixtures')
-rw-r--r--test/core/end2end/fixtures/h2_uchannel.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/core/end2end/fixtures/h2_uchannel.c b/test/core/end2end/fixtures/h2_uchannel.c
index ec1e5f4280..87bbd64d09 100644
--- a/test/core/end2end/fixtures/h2_uchannel.c
+++ b/test/core/end2end/fixtures/h2_uchannel.c
@@ -253,8 +253,7 @@ static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *arg, bool success) {
}
static grpc_connected_subchannel *connect_subchannel(grpc_subchannel *c) {
- gpr_mu mu;
- gpr_mu_init(&mu);
+ gpr_mu *mu;
grpc_pollset *pollset = gpr_malloc(grpc_pollset_size());
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_pollset_init(pollset, &mu);
@@ -264,22 +263,21 @@ static grpc_connected_subchannel *connect_subchannel(grpc_subchannel *c) {
&g_state,
grpc_closure_create(state_changed, c));
grpc_exec_ctx_flush(&exec_ctx);
- gpr_mu_lock(&mu);
+ gpr_mu_lock(mu);
while (g_state != GRPC_CHANNEL_READY) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, pollset, &worker, gpr_now(GPR_CLOCK_MONOTONIC),
GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1));
- gpr_mu_unlock(&mu);
+ gpr_mu_unlock(mu);
grpc_exec_ctx_flush(&exec_ctx);
- gpr_mu_lock(&mu);
+ gpr_mu_lock(mu);
}
grpc_pollset_shutdown(&exec_ctx, pollset,
grpc_closure_create(destroy_pollset, pollset));
grpc_pollset_set_destroy(g_interested_parties);
- gpr_mu_unlock(&mu);
+ gpr_mu_unlock(mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_free(pollset);
- gpr_mu_destroy(&mu);
return grpc_subchannel_get_connected_subchannel(c);
}