aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/filters/client_channel/subchannel_index.cc
diff options
context:
space:
mode:
authorGravatar Lizan Zhou <zlizan@google.com>2018-09-21 15:59:00 -0700
committerGravatar Lizan Zhou <zlizan@google.com>2018-09-21 15:59:00 -0700
commit91e15f65dcdcb7880c60f04c9fe97bdae1878de7 (patch)
tree0cd9d832ac5558083b6095647527135b2bf5d6ce /src/core/ext/filters/client_channel/subchannel_index.cc
parent9af7c7258987280bc6305b329e709400cde0e799 (diff)
parent12f42765cf3ea707a8adf94e56160cc9f069677b (diff)
Merge remote-tracking branch 'upstream/master' into fake_handshaker
Diffstat (limited to 'src/core/ext/filters/client_channel/subchannel_index.cc')
-rw-r--r--src/core/ext/filters/client_channel/subchannel_index.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/ext/filters/client_channel/subchannel_index.cc b/src/core/ext/filters/client_channel/subchannel_index.cc
index f2b6c24e8e..1c23a6c4be 100644
--- a/src/core/ext/filters/client_channel/subchannel_index.cc
+++ b/src/core/ext/filters/client_channel/subchannel_index.cc
@@ -42,7 +42,7 @@ struct grpc_subchannel_key {
grpc_subchannel_args args;
};
-static gpr_atm g_force_creation = false;
+static bool g_force_creation = false;
static grpc_subchannel_key* create_key(
const grpc_subchannel_args* args,
@@ -74,7 +74,7 @@ static grpc_subchannel_key* subchannel_key_copy(grpc_subchannel_key* k) {
int grpc_subchannel_key_compare(const grpc_subchannel_key* a,
const grpc_subchannel_key* b) {
// To pretend the keys are different, return a non-zero value.
- if (GPR_UNLIKELY(gpr_atm_no_barrier_load(&g_force_creation))) return 1;
+ if (GPR_UNLIKELY(g_force_creation)) return 1;
int c = GPR_ICMP(a->args.filter_count, b->args.filter_count);
if (c != 0) return c;
if (a->args.filter_count > 0) {
@@ -251,5 +251,5 @@ void grpc_subchannel_index_unregister(grpc_subchannel_key* key,
}
void grpc_subchannel_index_test_only_set_force_creation(bool force_creation) {
- gpr_atm_no_barrier_store(&g_force_creation, force_creation);
+ g_force_creation = force_creation;
}